summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Instance.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-09 15:59:35 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-09 15:59:35 +0000
commit77ce2751912eef6e7d8af75959358de220e7eb80 (patch)
tree88bf0da7b6719df5bd53c9738ce60acb80f844dc /cppe/src/IceE/Instance.cpp
parentCleaned up slice files, fixed IceGrid node with collocated registry warning (diff)
downloadice-77ce2751912eef6e7d8af75959358de220e7eb80.tar.bz2
ice-77ce2751912eef6e7d8af75959358de220e7eb80.tar.xz
ice-77ce2751912eef6e7d8af75959358de220e7eb80.zip
Added back static identity string functions
Diffstat (limited to 'cppe/src/IceE/Instance.cpp')
-rw-r--r--cppe/src/IceE/Instance.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/cppe/src/IceE/Instance.cpp b/cppe/src/IceE/Instance.cpp
index 9dc797bef7c..035e8b4cc4d 100644
--- a/cppe/src/IceE/Instance.cpp
+++ b/cppe/src/IceE/Instance.cpp
@@ -307,12 +307,12 @@ IceInternal::Instance::identityToString(const Identity& ident) const
UTF8BufferI buffer;
Byte* last = _initData.stringConverter->toUTF8(ident.name.data(), ident.name.data() + ident.name.size(),
buffer);
- name = string(buffer.getBuffer(), last);
+ name = string(reinterpret_cast<const char*>(buffer.getBuffer()), last - buffer.getBuffer());
buffer.reset();
last = _initData.stringConverter->toUTF8(ident.category.data(), ident.category.data() + ident.category.size(),
buffer);
- category = string(buffer.getBuffer(), last);
+ category = string(reinterpret_cast<const char*>(buffer.getBuffer()), last - buffer.getBuffer());
}
if(category.empty())
@@ -736,10 +736,8 @@ IceInternal::UTF8BufferI::getMoreBytes(size_t howMany, Byte* firstUnused)
}
else
{
- if(firstUnused != 0)
- {
- _offset = firstUnused - _buffer;
- }
+ assert(firstUnused != 0);
+ _offset = firstUnused - _buffer;
_buffer = (Byte*)realloc(_buffer, _offset + howMany);
}