From d5ca00c92782e60d030852c00ab69be3098e25d0 Mon Sep 17 00:00:00 2001 From: Glorf Date: Sun, 10 Mar 2013 12:11:38 +0100 Subject: [PATCH] Another fix --- apps/openmw/mwworld/weather.cpp | 10 +++++----- apps/openmw/mwworld/weather.hpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index c3ddab37b..6d05df4a2 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -19,7 +19,7 @@ using namespace MWWorld; using namespace MWSound; #define lerp(x, y) (x * (1-factor) + y * factor) -const std::string WeatherManager::getFallback (const std::string& key) +std::string WeatherManager::getFallback (const std::string& key) { std::map::const_iterator it; if((it = mFallback.find(key)) == mFallback.end()) @@ -28,18 +28,18 @@ const std::string WeatherManager::getFallback (const std::string& key) } return it->second; } -const std::string WeatherManager::getFallbackString(const std::string fall) +std::string WeatherManager::getFallbackString(const std::string& fall) { return WeatherManager::getFallback(fall); } -const float WeatherManager::getFallbackFloat(const std::string fall) +float WeatherManager::getFallbackFloat(const std::string& fall) { std::string fallback=getFallbackString(fall); return boost::lexical_cast(fallback); } -const ColourValue WeatherManager::getFallbackColour(const std::string fall) +ColourValue WeatherManager::getFallbackColour(const std::string& fall) { std::string sum; std::string ret[3]; @@ -51,7 +51,7 @@ const ColourValue WeatherManager::getFallbackColour(const std::string fall) } return ColourValue(boost::lexical_cast(ret[0])/255.f,boost::lexical_cast(ret[1])/255.f,boost::lexical_cast(ret[2])/255.f); } -const void WeatherManager::setFallbackWeather(Weather weather,const std::string name) +void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name) { std::string upper=name; upper[0]=toupper(name[0]); diff --git a/apps/openmw/mwworld/weather.hpp b/apps/openmw/mwworld/weather.hpp index ffe103664..3802cd600 100644 --- a/apps/openmw/mwworld/weather.hpp +++ b/apps/openmw/mwworld/weather.hpp @@ -142,11 +142,11 @@ namespace MWWorld float mHour; int mDay, mMonth; std::map mFallback; - const std::string getFallback (const std::string& key); - const std::string getFallbackString(const std::string fall); - const float getFallbackFloat(const std::string fall); - const Ogre::ColourValue getFallbackColour(const std::string fall); - const void setFallbackWeather(Weather weather,const std::string name); + std::string getFallback (const std::string& key); + std::string getFallbackString(const std::string& fall); + float getFallbackFloat(const std::string& fall); + Ogre::ColourValue getFallbackColour(const std::string& fall); + void setFallbackWeather(Weather& weather,const std::string& name); MWRender::RenderingManager* mRendering; std::map mWeatherSettings;