snddefault: fix some cppcheck warnings

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9431 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a04d17181878ded5af02a0f504199244f170fab9
Former-commit-id: 951fd03f34080e38207b5acd44ba579ce64d9981
This commit is contained in:
iobyte 2024-06-10 02:33:49 +00:00
parent 0017228cd0
commit cf6881dbb7
2 changed files with 3 additions and 3 deletions

View file

@ -26,8 +26,8 @@
OpenalSound::OpenalSound(const char* filename, OpenalSoundInterface* sitf,
int flags, bool loop, bool static_pool)
: Sound(flags, loop)
, static_pool(static_pool)
, itf(sitf)
, static_pool(static_pool)
{
GfLogTrace("OpenAL : Creating %s source from %s\n",
static_pool ? "static" : "dynamic", filename);

View file

@ -157,7 +157,7 @@ class SharedSourcePool {
return false;
}
bool isSourceActive(Sound* sound, int* index) {
bool isSourceActive(Sound* sound, int* index) const {
if (*index >= 0 && *index < nbsources &&
sound == pool[*index].currentOwner &&
true == pool[*index].in_use)
@ -168,7 +168,7 @@ class SharedSourcePool {
}
}
int getNbSources(void) { return nbsources; }
int getNbSources(void) const { return nbsources; }
protected:
int nbsources;