summaryrefslogtreecommitdiff
path: root/idl/source/objects/object.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-21 10:44:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-21 13:44:52 +0000
commitc4f0efc2378cebc3b581bc949da70a2b2f149961 (patch)
tree3c0a330f7811c9407a787cec45382993b4037a6f /idl/source/objects/object.cxx
parent073431d26d39216a7f5f85489ecd4eb60806ee88 (diff)
convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just return the string and for writing the number of bytes written Doesn't need to be members, make standalone functions Rename to read_lenPrefixed_uInt8s_ToO[U]String and write_lenPrefixed_uInt8s_FromO[U]String, lengthy, but much less unambiguous, seeing as a lot of users of it don't seem to be aware that they read/write pascal-style length prefixed strings, which isn't surprising given the apparent simplicity of their original name. added a unit test
Diffstat (limited to 'idl/source/objects/object.cxx')
-rw-r--r--idl/source/objects/object.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 0b3e1cf193e3..798acbc1e180 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -55,7 +55,7 @@ void SvClassElement::Load( SvPersistStream & rStm )
return;
}
if( nMask & 0x01 ) rStm >> aAutomation;
- if( nMask & 0x02 ) rStm.ReadByteString( aPrefix );
+ if( nMask & 0x02 ) aPrefix = read_lenPrefixed_uInt8s_ToOString(rStm);
if( nMask & 0x04 )
{
SvMetaClass * p;
@@ -75,7 +75,7 @@ void SvClassElement::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
if( nMask & 0x01 ) rStm << aAutomation;
- if( nMask & 0x02 ) rStm.WriteByteString( aPrefix );
+ if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
if( nMask & 0x04 ) rStm << xClass;
}