summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/InputUtil.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-09-22 17:07:43 +0000
committerMarc Laukien <marc@zeroc.com>2002-09-22 17:07:43 +0000
commitee9134f129672068403f488e9a326411ca9cc1b1 (patch)
tree5bd03a07398ed4ffd2fc8d929ab4a0ce97a843a1 /cpp/src/IceUtil/InputUtil.cpp
parentfixes (diff)
downloadice-ee9134f129672068403f488e9a326411ca9cc1b1.tar.bz2
ice-ee9134f129672068403f488e9a326411ca9cc1b1.tar.xz
ice-ee9134f129672068403f488e9a326411ca9cc1b1.zip
removed several static's
Diffstat (limited to 'cpp/src/IceUtil/InputUtil.cpp')
-rw-r--r--cpp/src/IceUtil/InputUtil.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp
index 322dc195955..5234054c5b0 100644
--- a/cpp/src/IceUtil/InputUtil.cpp
+++ b/cpp/src/IceUtil/InputUtil.cpp
@@ -14,6 +14,20 @@
using namespace std;
+static const string allDigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+//
+// Table to convert ASCII digits/letters into their value (100 for unused slots)
+//
+static const char digitVal[] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, // '0' - '9'
+ 100, 100, 100, 100, 100, 100, 100, // punctuation
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, // 'A' - 'J'
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, // 'K' - 'T'
+ 30, 31, 32, 33, 34, 35 // 'U' - 'Z'
+};
+
namespace IceUtil
{
@@ -88,23 +102,9 @@ strToInt64(const char* s, char** endptr, int base)
return 0;
}
- static const string allDigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- const string validDigits(allDigits.begin(), allDigits.begin() + base);
-
- //
- // Table to convert ASCII digits/letters into their value (100 for unused slots)
- //
- static const char digitVal[] =
- {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, // '0' - '9'
- 100, 100, 100, 100, 100, 100, 100, // punctuation
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, // 'A' - 'J'
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, // 'K' - 'T'
- 30, 31, 32, 33, 34, 35 // 'U' - 'Z'
- };
-
Int64 result = 0;
bool overflow = false;
+ const string validDigits(allDigits.begin(), allDigits.begin() + base);
while(*s && validDigits.find_first_of(toupper(*s)) != validDigits.npos)
{
if(!overflow)