summaryrefslogtreecommitdiff
path: root/src/gui/register.cpp
diff options
context:
space:
mode:
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 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);
}