diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-10-17 12:38:03 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-10-17 12:38:03 -0700 |
commit | f087326373250c76fa3b7b8e68cede0cb9af01ff (patch) | |
tree | e801ec18aba93a74b373388fc947617643da0008 /cpp/include/Ice/Stream.h | |
parent | Fix related to ICE-4847 (diff) | |
download | ice-f087326373250c76fa3b7b8e68cede0cb9af01ff.tar.bz2 ice-f087326373250c76fa3b7b8e68cede0cb9af01ff.tar.xz ice-f087326373250c76fa3b7b8e68cede0cb9af01ff.zip |
ICE-4619 - custom enumerator values
Diffstat (limited to 'cpp/include/Ice/Stream.h')
-rw-r--r-- | cpp/include/Ice/Stream.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index 21b53d9cb24..0048eb6b538 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -125,17 +125,17 @@ public: } Int - readEnum(Int limit) + readEnum(Int maxValue) { if(getEncoding() == Encoding_1_0) { - if(limit <= 127) + if(maxValue < 127) { Byte value; read(value); return value; } - else if(limit <= 32767) + else if(maxValue < 32767) { Short value; read(value); @@ -249,15 +249,15 @@ public: } void - writeEnum(Int v, Int limit) + writeEnum(Int v, Int maxValue) { if(getEncoding() == Encoding_1_0) { - if(limit <= 127) + if(maxValue < 127) { write(static_cast<Byte>(v)); } - else if(limit <= 32767) + else if(maxValue < 32767) { write(static_cast<Short>(v)); } |