diff options
author | Michi Henning <michi@zeroc.com> | 2002-07-08 23:32:45 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-07-08 23:32:45 +0000 |
commit | 88579ad4eb268f08fd6d6383899a4c7a8ac1cb83 (patch) | |
tree | 183a51911661ac13b85a4f0295f124377af0d677 /cpp/src/Slice/Parser.cpp | |
parent | Use istringstream >> operator instead of atoi and check for errors where (diff) | |
download | ice-88579ad4eb268f08fd6d6383899a4c7a8ac1cb83.tar.bz2 ice-88579ad4eb268f08fd6d6383899a4c7a8ac1cb83.tar.xz ice-88579ad4eb268f08fd6d6383899a4c7a8ac1cb83.zip |
Style fixes: Changed INT64MIN and INT64MAX to Int64Min and Int64Max.
Moved the definitions of Int64, Int64Min, and Int64Max into
IceUtil/Config.h.
Updated scanner and parser to use the new constant names. Also applied
style fixes to parser: INT16MIN -> Int16Min, BYTEMIN -> ByteMin, etc.
Changed Time.h and Time.cpp to use the Int64 type from IceUtil/Config.h.
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 206a2c0b486..ed00a9e2b48 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -1595,7 +1595,7 @@ Slice::Container::checkRange(const string& name, const TypePtr& constType, const case Builtin::KindByte: { IceUtil::Int64 l = IceUtil::strToInt64(value.c_str(), 0, 0); - if(l < BYTEMIN || l > BYTEMAX) + if(l < ByteMin || l > ByteMax) { string msg = "initializer `" + value + "' for constant `" + name + "' out of range for type byte"; _unit->error(msg); @@ -1606,7 +1606,7 @@ Slice::Container::checkRange(const string& name, const TypePtr& constType, const case Builtin::KindShort: { IceUtil::Int64 l = IceUtil::strToInt64(value.c_str(), 0, 0); - if(l < INT16MIN || l > INT16MAX) + if(l < Int16Min || l > Int16Max) { string msg = "initializer `" + value + "' for constant `" + name + "' out of range for type short"; _unit->error(msg); @@ -1617,7 +1617,7 @@ Slice::Container::checkRange(const string& name, const TypePtr& constType, const case Builtin::KindInt: { IceUtil::Int64 l = IceUtil::strToInt64(value.c_str(), 0, 0); - if(l < INT32MIN || l > INT32MAX) + if(l < Int32Min || l > Int32Max) { string msg = "initializer `" + value + "' for constant `" + name + "' out of range for type int"; _unit->error(msg); |