Make Sound::getBuffer return a reference
because the pointer now cannot be null
This commit is contained in:
parent
9cbcd56eb8
commit
635c8c9290
@ -164,10 +164,10 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the audio buffer attached to the sound
|
/// \brief Get the audio buffer attached to the sound
|
||||||
///
|
///
|
||||||
/// \return Sound buffer attached to the sound (can be a null pointer)
|
/// \return Sound buffer attached to the sound
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
const SoundBuffer* getBuffer() const;
|
const SoundBuffer& getBuffer() const;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Tell whether or not the sound is in loop mode
|
/// \brief Tell whether or not the sound is in loop mode
|
||||||
|
@ -110,9 +110,9 @@ void Sound::setPlayingOffset(Time timeOffset)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
const SoundBuffer* Sound::getBuffer() const
|
const SoundBuffer& Sound::getBuffer() const
|
||||||
{
|
{
|
||||||
return m_buffer;
|
return *m_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user