Fixed constructor to use move constructors.
Some checks failed
Build & Release / Linux-AMD64-Build (push) Successful in 1m44s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m46s
Build & Release / Windows-AMD64-Build (push) Failing after 7h1m29s

This commit is contained in:
Arron David Nelson 2024-07-09 19:23:24 -07:00
parent fa2b801690
commit a65c8d64b5
2 changed files with 9 additions and 8 deletions

View File

@ -21,7 +21,7 @@ namespace ehs
Str_8 id;
};
class Spotify
class Spotify final
{
private:
SSL client;
@ -40,14 +40,14 @@ namespace ehs
Spotify();
Spotify(const Str_8& clientId, const Str_8& secret, const Str_8& redURI, const Array<Str_8>& scopes, const bool forceVerify);
Spotify(Str_8 clientId, Str_8 secret, Str_8 redURI, Array<Str_8> scopes, bool forceVerify);
bool Authorize();
/// Sets the volume for a device.
/// @param [in] level The percentage to set the volume to.
/// @returns The response code.
UInt_32 SetVolume(const UInt_8 level);
UInt_32 SetVolume(UInt_8 level);
/// Resume playback for a device.
/// @returns The response code.
@ -60,12 +60,12 @@ namespace ehs
/// Repeats playback for a device.
/// @param [in] status The status to set it to.
/// @returns The response code.
UInt_32 SetRepeat(const SpotifyState state);
UInt_32 SetRepeat(SpotifyState state);
/// Shuffles playback for a device.
/// @param [in] state The state to set shuffle to.
/// @returns The response code.
UInt_32 SetShuffle(const bool state);
UInt_32 SetShuffle(bool state);
UInt_32 SearchTrack(Vector<Str_8>& artists, Str_8& id, Str_8& name);
@ -93,7 +93,7 @@ namespace ehs
/// Seeks to a position of the currently playing track in milliseconds.
/// @param [in] pos The position in milliseconds to seek to.
/// @returns The response code.
UInt_32 Seek(const UInt_32 pos);
UInt_32 Seek(UInt_32 pos);
Str_8 GetClientId() const;

View File

@ -17,8 +17,9 @@ namespace ehs
{
}
Spotify::Spotify(const Str_8& clientId, const Str_8& secret, const Str_8& redURI, const Array<Str_8>& scopes, const bool forceVerify)
: client(AddrType::IPV4), clientId(clientId), secret(secret), redURI(redURI), scopes(scopes), forceVerify(forceVerify)
Spotify::Spotify(Str_8 clientId, Str_8 secret, Str_8 redURI, Array<Str_8> scopes, const bool forceVerify)
: client(AddrType::IPV4), clientId((Str_8 &&)clientId), secret((Str_8 &&)secret), redURI((Str_8 &&)redURI),
scopes((Array<Str_8> &&)scopes), forceVerify(forceVerify)
{
}