From 026cd6f71a15edd1a242c59d5cb9f8271a108506 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 4 Jun 2012 08:11:36 +0000 Subject: UtfString supports get and append now, but it still needs a lot of work. --- src/stable/variant.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/stable') 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() Bu::String Bu::Variant::toString() const { - Bu::MemBuf mb; - Bu::Formatter f( mb ); - f << *this; - return mb.getString(); + if( getType() == typeid( Bu::String ) ) + { + return get(); + } + else + { + Bu::MemBuf mb; + Bu::Formatter f( mb ); + f << *this; + return mb.getString(); + } } bool Bu::Variant::isSet() const -- cgit v1.2.3