From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/variant.cpp | 92 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'src/stable/variant.cpp') diff --git a/src/stable/variant.cpp b/src/stable/variant.cpp index 674ae04..d724fa7 100644 --- a/src/stable/variant.cpp +++ b/src/stable/variant.cpp @@ -11,7 +11,7 @@ namespace Bu { - Formatter &operator<<( Formatter &f, const String &s ); + Formatter &operator<<( Formatter &f, const String &s ); }; Bu::VariantTypeRoot::VariantTypeRoot() @@ -23,84 +23,84 @@ Bu::VariantTypeRoot::~VariantTypeRoot() } Bu::Variant::Variant() : - pCore( NULL ) + pCore( NULL ) { } Bu::Variant::Variant( const Variant &v ) : - pCore( NULL ) + pCore( NULL ) { - if( v.pCore ) - { - pCore = v.pCore->clone(); - } + if( v.pCore ) + { + pCore = v.pCore->clone(); + } } Bu::Variant::Variant( const char *t ) : - pCore( NULL ) + pCore( NULL ) { - set( Bu::String( t ) ); + set( Bu::String( t ) ); } Bu::Variant::~Variant() { - if( pCore ) - { - delete pCore; - pCore = NULL; - } + if( pCore ) + { + delete pCore; + pCore = NULL; + } } Bu::String Bu::Variant::toString() const { - if( getType() == typeid( Bu::String ) ) - { - return get(); - } - else - { - 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 { - return pCore != NULL; + return pCore != NULL; } const std::type_info &Bu::Variant::getType() const { - if( !pCore ) - { - throw Bu::ExceptionBase("No data!"); - } - return pCore->getType(); + if( !pCore ) + { + throw Bu::ExceptionBase("No data!"); + } + return pCore->getType(); } Bu::Variant &Bu::Variant::operator=( const Bu::Variant &rhs ) { - if( pCore ) - { - delete pCore; - pCore = NULL; - } - if( rhs.pCore ) - { - pCore = rhs.pCore->clone(); - } - - return *this; + if( pCore ) + { + delete pCore; + pCore = NULL; + } + if( rhs.pCore ) + { + pCore = rhs.pCore->clone(); + } + + return *this; } Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::Variant &v ) { - if( !v.pCore ) - return f << "(null)"; + if( !v.pCore ) + return f << "(null)"; - v.pCore->format( f ); - return f; + v.pCore->format( f ); + return f; } -- cgit v1.2.3