diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-24 22:48:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-24 22:48:35 +0300 |
commit | b474de4a54c9b1d4d863971e40b807588d554436 (patch) | |
tree | 761e71f86ea232d1688ee2838bd2294c59dea947 /src/being.cpp | |
parent | a316d537dce50f4b4e1e10f5c26a7851baddbd8b (diff) | |
download | plus-b474de4a54c9b1d4d863971e40b807588d554436.tar.gz plus-b474de4a54c9b1d4d863971e40b807588d554436.tar.bz2 plus-b474de4a54c9b1d4d863971e40b807588d554436.tar.xz plus-b474de4a54c9b1d4d863971e40b807588d554436.zip |
replace defines to consts.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp index 8ec6f7927..6316c26c3 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -67,7 +67,7 @@ #include "debug.h" -#define CACHE_SIZE 50 +const unsigned int CACHE_SIZE = 50; class BeingCacheEntry { @@ -451,8 +451,8 @@ void Being::setSpeech(const std::string &text, int time) if (!time && mSpeech.size() < 200) time = static_cast<int>(SPEECH_TIME - 300 + (3 * mSpeech.size())); - if (time < SPEECH_MIN_TIME) - time = SPEECH_MIN_TIME; + if (time < static_cast<int>(SPEECH_MIN_TIME)) + time = static_cast<int>(SPEECH_MIN_TIME); // Check for links size_t start = mSpeech.find('['); @@ -486,7 +486,10 @@ void Being::setSpeech(const std::string &text, int time) } if (!mSpeech.empty()) - mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME; + { + mSpeechTime = time <= static_cast<int>(SPEECH_MAX_TIME) + ? time : static_cast<int>(SPEECH_MAX_TIME); + } const int speech = mSpeechType; if (speech == TEXT_OVERHEAD && userPalette) |