diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-01-23 14:36:10 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-01-23 14:36:10 +0100 |
commit | 66bf1a7f2d0d46281ebf3d62caab6b9158eaa8a0 (patch) | |
tree | bd6aca447179f8d2e586c12cb961d683552504be /cpp/src/Freeze/ObjectStore.cpp | |
parent | Minor code style fixes (diff) | |
download | ice-66bf1a7f2d0d46281ebf3d62caab6b9158eaa8a0.tar.bz2 ice-66bf1a7f2d0d46281ebf3d62caab6b9158eaa8a0.tar.xz ice-66bf1a7f2d0d46281ebf3d62caab6b9158eaa8a0.zip |
Fix for ICE-4841 - added no copy option when creating input stream
Diffstat (limited to 'cpp/src/Freeze/ObjectStore.cpp')
-rw-r--r-- | cpp/src/Freeze/ObjectStore.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp index 44a9fb2b02f..bf4f3b0545d 100644 --- a/cpp/src/Freeze/ObjectStore.cpp +++ b/cpp/src/Freeze/ObjectStore.cpp @@ -346,10 +346,7 @@ Freeze::ObjectStoreBase::unmarshal(Identity& ident, const EncodingVersion& encoding) { IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); - IceInternal::BasicStream stream(instance.get(), encoding, true); - stream.b.resize(bytes.size()); - memcpy(&stream.b[0], &bytes[0], bytes.size()); - stream.i = stream.b.begin(); + IceInternal::BasicStream stream(instance.get(), encoding, &bytes[0], &bytes[0] + bytes.size()); stream.read(ident); } @@ -385,11 +382,8 @@ Freeze::ObjectStoreBase::unmarshal(ObjectRecord& v, bool keepStats) { IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); - IceInternal::BasicStream stream(instance.get(), encoding, true); + IceInternal::BasicStream stream(instance.get(), encoding, &bytes[0], &bytes[0] + bytes.size()); stream.sliceObjects(false); - stream.b.resize(bytes.size()); - memcpy(&stream.b[0], &bytes[0], bytes.size()); - stream.i = stream.b.begin(); stream.startReadEncaps(); if(keepStats) |