diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-02-20 09:47:10 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 09:47:10 +1100 |
commit | 1c89042016c739815b2d70bcbef4673eef6b63e0 (patch) | |
tree | f7c8e96e744222857c613e5fd14720d2695613c3 /source/frontend/StarVoice.cpp | |
parent | 30e1871d3f44629e00a1f66d8164e3e62c7f889f (diff) | |
parent | 7c4fbad2ba7d79580a9ebbf9fde1de117be4d08e (diff) |
Merge pull request #19 from kblaschke/fix-compiler-warnings
Fixed a huge amount of Clang warnings
Diffstat (limited to 'source/frontend/StarVoice.cpp')
-rw-r--r-- | source/frontend/StarVoice.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/frontend/StarVoice.cpp b/source/frontend/StarVoice.cpp index 168d23b..f7155e6 100644 --- a/source/frontend/StarVoice.cpp +++ b/source/frontend/StarVoice.cpp @@ -61,7 +61,8 @@ float getAudioLoudness(int16_t* data, size_t samples, float volume = 1.0f) { return highest; } -struct VoiceAudioStream { +class VoiceAudioStream { +public: // TODO: This should really be a ring buffer instead. std::queue<int16_t> samples; SDL_AudioStream* sdlAudioStreamMono; @@ -173,7 +174,7 @@ template <typename T> inline bool change(T& value, T newValue, bool& out) { bool changed = value != newValue; out |= changed; - value = move(newValue); + value = std::move(newValue); return changed; } @@ -480,7 +481,7 @@ int Voice::send(DataStreamBuffer& out, size_t budget) { if (m_encodedChunks.empty()) return 0; - std::vector<ByteArray> encodedChunks = move(m_encodedChunks); + std::vector<ByteArray> encodedChunks = std::move(m_encodedChunks); size_t encodedChunksLength = m_encodedChunksLength; m_encodedChunksLength = 0; @@ -692,7 +693,7 @@ void Voice::thread() { { MutexLocker lock(m_encodeMutex); - m_encodedChunks.emplace_back(move(encoded)); + m_encodedChunks.emplace_back(std::move(encoded)); m_encodedChunksLength += encodedSize; encoded = ByteArray(VOICE_MAX_PACKET_SIZE, 0); |