diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-07-21 09:42:01 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-07-21 09:42:01 -0230 |
commit | b30759dfccb7f844d3957bc09d68d0077a334e6a (patch) | |
tree | 7c3f9f8bccc3f674aedd70014a1925755937d5d9 /cpp | |
parent | Fixed build failure on Windows 64bits (diff) | |
download | ice-b30759dfccb7f844d3957bc09d68d0077a334e6a.tar.bz2 ice-b30759dfccb7f844d3957bc09d68d0077a334e6a.tar.xz ice-b30759dfccb7f844d3957bc09d68d0077a334e6a.zip |
ICE-5481 use size_type for Stream startSize() return type
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 6 | ||||
-rw-r--r-- | cpp/include/Ice/Stream.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/StreamI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/StreamI.h | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index a6e75c7fbd5..75e43ad8026 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -400,14 +400,14 @@ public: Ice::Int readAndCheckSeqSize(int); - int startSize() + size_type startSize() { - int pos = static_cast<Ice::Int>(b.size()); + size_type pos = b.size(); write(Ice::Int(0)); return pos; } - void endSize(int pos) + void endSize(size_type pos) { assert(pos >= 0); rewrite(static_cast<Ice::Int>(b.size()) - pos - 4, pos); diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index 830442ddde7..638fb80d705 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -351,8 +351,8 @@ public: virtual bool writeOptional(Int, OptionalFormat) = 0; - virtual int startSize() = 0; - virtual void endSize(int pos) = 0; + virtual size_type startSize() = 0; + virtual void endSize(size_type pos) = 0; template<typename T> inline void write(const T& v) { diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp index eb3ae4f13ae..f889f71b8be 100644 --- a/cpp/src/Ice/StreamI.cpp +++ b/cpp/src/Ice/StreamI.cpp @@ -729,14 +729,14 @@ OutputStreamI::rewrite(Int sz, size_type p) _os->rewrite(sz, p); } -int +OutputStream::size_type OutputStreamI::startSize() { return _os->startSize(); } void -OutputStreamI::endSize(int pos) +OutputStreamI::endSize(OutputStream::size_type pos) { _os->endSize(pos); } diff --git a/cpp/src/Ice/StreamI.h b/cpp/src/Ice/StreamI.h index 88f9893c96f..103d917cc3e 100644 --- a/cpp/src/Ice/StreamI.h +++ b/cpp/src/Ice/StreamI.h @@ -183,8 +183,8 @@ public: virtual size_type pos(); virtual void rewrite(Int, size_type); - virtual int startSize(); - virtual void endSize(int pos); + virtual size_type startSize(); + virtual void endSize(size_type pos); private: |