summaryrefslogtreecommitdiff
path: root/src/stable
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-06-04 08:11:36 +0000
committerMike Buland <eichlan@xagasoft.com>2012-06-04 08:11:36 +0000
commit026cd6f71a15edd1a242c59d5cb9f8271a108506 (patch)
treedc2d2ee77b94fa83e8312a2c3bb0d4531cf635e2 /src/stable
parent8ff104489cf8eb6322bec90ebc8d66fedae665c9 (diff)
downloadlibbu++-026cd6f71a15edd1a242c59d5cb9f8271a108506.tar.gz
libbu++-026cd6f71a15edd1a242c59d5cb9f8271a108506.tar.bz2
libbu++-026cd6f71a15edd1a242c59d5cb9f8271a108506.tar.xz
libbu++-026cd6f71a15edd1a242c59d5cb9f8271a108506.zip
UtfString supports get and append now, but it still needs a lot of work.
Diffstat (limited to 'src/stable')
-rw-r--r--src/stable/variant.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/stable/variant.cpp b/src/stable/variant.cpp
index 5100e9c..674ae04 100644
--- a/src/stable/variant.cpp
+++ b/src/stable/variant.cpp
@@ -53,10 +53,17 @@ Bu::Variant::~Variant()
53 53
54Bu::String Bu::Variant::toString() const 54Bu::String Bu::Variant::toString() const
55{ 55{
56 Bu::MemBuf mb; 56 if( getType() == typeid( Bu::String ) )
57 Bu::Formatter f( mb ); 57 {
58 f << *this; 58 return get<Bu::String>();
59 return mb.getString(); 59 }
60 else
61 {
62 Bu::MemBuf mb;
63 Bu::Formatter f( mb );
64 f << *this;
65 return mb.getString();
66 }
60} 67}
61 68
62bool Bu::Variant::isSet() const 69bool Bu::Variant::isSet() const