diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 22:30:00 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-09 17:10:37 -0700 |
commit | 1db7d10787f462430054ba04110a8d4647bdbd0a (patch) | |
tree | 60dc4d04c738b1f54a41bc9d9b6d0e5ffb0fb1d4 /src/gui/register.cpp | |
parent | 1ae95b709235ce811ce72437aa257bb7500e00d0 (diff) | |
download | mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.gz mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.bz2 mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.xz mana-1db7d10787f462430054ba04110a8d4647bdbd0a.zip |
Mostly whitespace fixes
Removed tab characters and trailing spaces and added spaces between
"if(", "for(", "while(" and "switch(".
Diffstat (limited to 'src/gui/register.cpp')
-rw-r--r-- | src/gui/register.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/register.cpp b/src/gui/register.cpp index cbf87e5b..cf12375c 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -251,21 +251,21 @@ bool RegisterDialog::isUShort(const std::string &str) { if (str == "") { - return false; + return false; } unsigned long l = 0; for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end(); - strPtr != strEnd; ++strPtr) + strPtr != strEnd; ++strPtr) { - if (*strPtr < '0' || *strPtr > '9') + if (*strPtr < '0' || *strPtr > '9') { - return false; - } - l = l * 10 + (*strPtr - '0'); // *strPtr - '0' will never be negative - if (l > 65535) - { - return false; - } + return false; + } + l = l * 10 + (*strPtr - '0'); // *strPtr - '0' will never be negative + if (l > 65535) + { + return false; + } } return true; } @@ -274,9 +274,9 @@ unsigned short RegisterDialog::getUShort(const std::string &str) { unsigned long l = 0; for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end(); - strPtr != strEnd; ++strPtr) + strPtr != strEnd; ++strPtr) { - l = l * 10 + (*strPtr - '0'); + l = l * 10 + (*strPtr - '0'); } return static_cast<unsigned short>(l); } |