diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-09-24 17:01:05 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-09-24 17:01:05 -0400 |
commit | cc15ebed97ad43d9f2b04e73c8555ac4b2a3a0a3 (patch) | |
tree | ccf84d02fe6defae4995259028d4bacd4a403ee4 /cpp/src/Ice/StreamI.cpp | |
parent | Partial fix for ICE-3393: (diff) | |
download | ice-cc15ebed97ad43d9f2b04e73c8555ac4b2a3a0a3.tar.bz2 ice-cc15ebed97ad43d9f2b04e73c8555ac4b2a3a0a3.tar.xz ice-cc15ebed97ad43d9f2b04e73c8555ac4b2a3a0a3.zip |
Replaced optionalType in StreamTrait<> by a bool fixedLength member
and updated slice2cpp accordingly
No longer rely on assert / static_assert to detect incorrect use of
base StreamOptionalHelper: now, the code no longer compiles
vector<bool> is now handled like a built-in type: InputStream and
OutputStream have now read / write vector<bool>& functions. The default
implementation (StreamI) simply delegates to the same functions on
BasicStream.
Diffstat (limited to 'cpp/src/Ice/StreamI.cpp')
-rw-r--r-- | cpp/src/Ice/StreamI.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp index 431926d64b0..0cb438049c7 100644 --- a/cpp/src/Ice/StreamI.cpp +++ b/cpp/src/Ice/StreamI.cpp @@ -235,6 +235,12 @@ InputStreamI::read(wstring& v) } void +InputStreamI::read(vector<bool>& v) +{ + _is->read(v); +} + +void InputStreamI::read(pair<const bool*, const bool*>& p, ::IceUtil::ScopedArray<bool>& result) { result.reset(_is->read(p)); @@ -528,6 +534,12 @@ OutputStreamI::write(const wstring& v) _os->write(v); } +void +OutputStreamI::write(const vector<bool>& v) +{ + _os->write(v); +} + void OutputStreamI::write(const bool* begin, const bool* end) { |