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:
Max Kellermann
2018-01-20 00:33:01 +01:00
parent c3b8568560
commit ab9d9541a8
5 changed files with 6 additions and 6 deletions

View File

@@ -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);