diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-09 23:41:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-09 23:41:59 +0300 |
commit | a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5 (patch) | |
tree | 20a5024ce03d3b0abedd76378c534f4150af0ee9 /src/being.cpp | |
parent | d0ccffd7db79f5dbff6f2cb4f8b77a8bb3435e57 (diff) | |
download | plus-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.gz plus-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.bz2 plus-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.xz plus-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.zip |
improve size() methods usage.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp index 2087b6e0b..287cc3ecd 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -420,9 +420,12 @@ void Being::setSpeech(const std::string &text, const std::string &channel, if (mSpeech.empty()) return; - const size_t sz = mSpeech.size(); - if (!time && sz < 200) - time = static_cast<int>(SPEECH_TIME - 300 + (3 * sz)); + if (!time) + { + const size_t sz = mSpeech.size(); + if (sz < 200) + time = static_cast<int>(SPEECH_TIME - 300 + (3 * sz)); + } if (time < static_cast<int>(SPEECH_MIN_TIME)) time = static_cast<int>(SPEECH_MIN_TIME); |