summaryrefslogtreecommitdiff
path: root/src/gui/register.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 22:30:00 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 22:31:11 +0100
commit07f7d52f661a74e6d0c780ca53e724651e3dcc48 (patch)
treeb55b8c0d04a1544ace42f00642adfde4ad045d94 /src/gui/register.cpp
parent6c29cfa167820635ea602b5cc31dcfeb7b04478c (diff)
downloadmana-07f7d52f661a74e6d0c780ca53e724651e3dcc48.tar.gz
mana-07f7d52f661a74e6d0c780ca53e724651e3dcc48.tar.bz2
mana-07f7d52f661a74e6d0c780ca53e724651e3dcc48.tar.xz
mana-07f7d52f661a74e6d0c780ca53e724651e3dcc48.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.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 9c337d9e..bf45b711 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -255,21 +255,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;
}
@@ -278,9 +278,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);
}