diff options
author | Marc Laukien <marc@zeroc.com> | 2002-02-12 04:59:12 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-02-12 04:59:12 +0000 |
commit | e764b6d2adc5a0ef75caf1f6f406af86bd95aa1c (patch) | |
tree | 1136dc7e95fc1d36b509f50a9b87a1c04179a576 /cpp/include/Ice/BasicStream.h | |
parent | made some inline ops non-inline; added comments and TODOs (diff) | |
download | ice-e764b6d2adc5a0ef75caf1f6f406af86bd95aa1c.tar.bz2 ice-e764b6d2adc5a0ef75caf1f6f406af86bd95aa1c.tar.xz ice-e764b6d2adc5a0ef75caf1f6f406af86bd95aa1c.zip |
made some inline ops non-inline; added comments and TODOs
Diffstat (limited to 'cpp/include/Ice/BasicStream.h')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 6139d5a1fbc..ec1ced5cbe8 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -51,12 +51,22 @@ public: void writeBlob(const std::vector<Ice::Byte>&); void readBlob(std::vector<Ice::Byte>&, Ice::Int); - void write(Ice::Byte v) { b.push_back(v); } + // Performance critical function inlined, as writing single bytes + // is used in many places in Ice code. + void write(Ice::Byte v) + { + b.push_back(v); + } void write(const std::vector<Ice::Byte>&); void read(Ice::Byte&); void read(std::vector<Ice::Byte>&); - void write(bool v) { b.push_back(static_cast<Ice::Byte>(v)); } + // Performance critical function inlined, as writing single bools + // is used in many places in Ice code. + void write(bool v) + { + b.push_back(static_cast<Ice::Byte>(v)); + } void write(const std::vector<bool>&); void read(bool&); void read(std::vector<bool>&); |