From 0d973ac8ffa5d7cf196642c83907c85eef52c869 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 21 Mar 2012 14:38:37 -0700 Subject: [PATCH] Use the vector's data field instead of the address of the first element Same thing really, but less convoluted --- apps/openmw/mwsound/openal_output.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 1efb70db4..d41d692db 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -204,8 +204,8 @@ void OpenAL_SoundStream::play() for(ALuint i = 0;i < sNumBuffers;i++) { size_t got; - got = mDecoder->read(&data[0], data.size()); - alBufferData(mBuffers[i], mFormat, &data[0], got, mSampleRate); + got = mDecoder->read(data.data(), data.size()); + alBufferData(mBuffers[i], mFormat, data.data(), got, mSampleRate); } throwALerror(); @@ -270,11 +270,11 @@ bool OpenAL_SoundStream::process() if(mIsFinished) continue; - got = mDecoder->read(&data[0], data.size()); + got = mDecoder->read(data.data(), data.size()); mIsFinished = (got < data.size()); if(got > 0) { - alBufferData(bufid, mFormat, &data[0], got, mSampleRate); + alBufferData(bufid, mFormat, data.data(), got, mSampleRate); alSourceQueueBuffers(mSource, 1, &bufid); } } while(processed > 0);