input/tidal: pass std::string by value
Don't keep any references to the owner, as the handler method may delete the owner.
This commit is contained in:
parent
c3b8568560
commit
ab9d9541a8
|
@ -74,7 +74,7 @@ private:
|
|||
void OnTidalSession() noexcept override;
|
||||
|
||||
/* virtual methods from TidalTrackHandler */
|
||||
void OnTidalTrackSuccess(std::string &&url) noexcept override;
|
||||
void OnTidalTrackSuccess(std::string url) noexcept override;
|
||||
void OnTidalTrackError(std::exception_ptr error) noexcept override;
|
||||
};
|
||||
|
||||
|
@ -98,7 +98,7 @@ TidalInputStream::OnTidalSession() noexcept
|
|||
}
|
||||
|
||||
void
|
||||
TidalInputStream::OnTidalTrackSuccess(std::string &&url) noexcept
|
||||
TidalInputStream::OnTidalTrackSuccess(std::string url) noexcept
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class CurlRequest;
|
|||
*/
|
||||
class TidalLoginHandler {
|
||||
public:
|
||||
virtual void OnTidalLoginSuccess(std::string &&session) noexcept = 0;
|
||||
virtual void OnTidalLoginSuccess(std::string session) noexcept = 0;
|
||||
virtual void OnTidalLoginError(std::exception_ptr error) noexcept = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
|
|||
}
|
||||
|
||||
void
|
||||
TidalSessionManager::OnTidalLoginSuccess(std::string &&_session) noexcept
|
||||
TidalSessionManager::OnTidalLoginSuccess(std::string _session) noexcept
|
||||
{
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
|
|
|
@ -158,7 +158,7 @@ private:
|
|||
}
|
||||
|
||||
/* virtual methods from TidalLoginHandler */
|
||||
void OnTidalLoginSuccess(std::string &&session) noexcept override;
|
||||
void OnTidalLoginSuccess(std::string session) noexcept override;
|
||||
void OnTidalLoginError(std::exception_ptr error) noexcept override;
|
||||
};
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class TidalTrackHandler
|
|||
: public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::safe_link>>
|
||||
{
|
||||
public:
|
||||
virtual void OnTidalTrackSuccess(std::string &&url) noexcept = 0;
|
||||
virtual void OnTidalTrackSuccess(std::string url) noexcept = 0;
|
||||
virtual void OnTidalTrackError(std::exception_ptr error) noexcept = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue