diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beinginfo.cpp | 4 | ||||
-rw-r--r-- | src/resources/image.cpp | 6 | ||||
-rw-r--r-- | src/resources/itemdb.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 8beea420d..4aa7515b1 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -94,10 +94,10 @@ void BeingInfo::addSound(SoundEvent event, const std::string &filename) const std::string &BeingInfo::getSound(SoundEvent event) const { - static std::string empty(""); + static std::string emptySound(""); SoundEvents::const_iterator i = mSounds.find(event); - return (i == mSounds.end() || !i->second) ? empty : + return (i == mSounds.end() || !i->second) ? emptySound : i->second->at(rand() % i->second->size()); } diff --git a/src/resources/image.cpp b/src/resources/image.cpp index e28cb2bc5..8f5ee1d2d 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -49,12 +49,12 @@ int Image::mTextureSize = 0; bool Image::mEnableAlphaCache = false; bool Image::mEnableAlpha = true; -Image::Image(SDL_Surface *image, bool hasAlphaChannel, Uint8 *alphaChannel): +Image::Image(SDL_Surface *image, bool hasAlphaChannel0, Uint8 *alphaChannel): mAlpha(1.0f), - mHasAlphaChannel(hasAlphaChannel), + mHasAlphaChannel(hasAlphaChannel0), mSDLSurface(image), mAlphaChannel(alphaChannel), - mIsAlphaVisible(hasAlphaChannel), + mIsAlphaVisible(hasAlphaChannel0), mIsAlphaCalculated(false) { #ifdef USE_OPENGL diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 89df407a6..9ff80de22 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -361,7 +361,7 @@ void ItemDB::load() mItemInfos[id] = itemInfo; if (!name.empty()) { - std::string temp = normalize(name); + temp = normalize(name); NamedItemInfos::const_iterator itr = mNamedItemInfos.find(temp); if (itr == mNamedItemInfos.end()) |