diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-05-06 14:05:41 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-05-06 14:05:41 +0200 |
commit | d8617dcd8dc79e135be0cc9cc534a43d5b328c0e (patch) | |
tree | 1ac14bcb49ec34734c90d0c9c719169331b3c68a /cpp/src/Ice/Protocol.cpp | |
parent | ICE-6483 upgrade to gradle 2.4 (diff) | |
download | ice-d8617dcd8dc79e135be0cc9cc534a43d5b328c0e.tar.bz2 ice-d8617dcd8dc79e135be0cc9cc534a43d5b328c0e.tar.xz ice-d8617dcd8dc79e135be0cc9cc534a43d5b328c0e.zip |
Fixed ICE-6482: Cleanup WinRT makefiles, other WinRT minor fixes
Diffstat (limited to 'cpp/src/Ice/Protocol.cpp')
-rw-r--r-- | cpp/src/Ice/Protocol.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp index 341e82497c3..8816e68fb4c 100644 --- a/cpp/src/Ice/Protocol.cpp +++ b/cpp/src/Ice/Protocol.cpp @@ -9,13 +9,14 @@ #include <Ice/Protocol.h> #include <Ice/LocalException.h> +#include <Ice/BasicStream.h> namespace IceInternal { const Ice::Byte magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' -const Ice::Byte requestHdr[] = +const Ice::Byte requestHdr[] = { magic[0], magic[1], @@ -47,7 +48,7 @@ const Ice::Byte requestBatchHdr[] = 0, 0, 0, 0 // Number of requests in batch (placeholder) }; -const Ice::Byte replyHdr[] = +const Ice::Byte replyHdr[] = { magic[0], magic[1], @@ -81,7 +82,7 @@ stringToMajorMinor(const std::string& str, Ice::Byte& major, Ice::Byte& minor) ex.str = "invalid major version value `" + str + "'"; throw ex; } - + std::istringstream minStr(str.substr(pos + 1, std::string::npos)); Ice::Int minVersion; if(!(minStr >> minVersion) || !minStr.eof()) @@ -97,12 +98,12 @@ stringToMajorMinor(const std::string& str, Ice::Byte& major, Ice::Byte& minor) ex.str = "range error in version `" + str + "'"; throw ex; } - + major = static_cast<Ice::Byte>(majVersion); minor = static_cast<Ice::Byte>(minVersion); } -void +void throwUnsupportedProtocolException(const char* f, int l, const Ice::ProtocolVersion& v, const Ice::ProtocolVersion& s) { throw Ice::UnsupportedProtocolException(f, l, "", v, s); @@ -126,7 +127,7 @@ const ProtocolVersion currentProtocol = { IceInternal::protocolMajor, IceInterna // The encoding to use for protocol messages, this version is tied to // the protocol version. // -const EncodingVersion currentProtocolEncoding = { IceInternal::protocolEncodingMajor, +const EncodingVersion currentProtocolEncoding = { IceInternal::protocolEncodingMajor, IceInternal::protocolEncodingMinor }; const ProtocolVersion Protocol_1_0 = { 1, 0 }; |