From e3dabb7f0a22c6442dde5f261d3414f9e7369592 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Sep 2011 23:11:23 +0300 Subject: Last fix part of shadow variables/methods errors. --- src/resources/beinginfo.cpp | 4 ++-- src/resources/image.cpp | 6 +++--- src/resources/itemdb.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/resources') 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()) -- cgit v1.2.3-60-g2f50