X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fvariant.h;fp=source%2Fcore%2Fvariant.h;h=443befb481620b4242e178a4b377192179af1adc;hp=2e9caaf9b79440bacff303975a208321f6cdcd22;hb=41363aed34382386f915f17c1a961750b4fdcb14;hpb=26a5878092f6547e701fd1a33abbf1878d26ab70 diff --git a/source/core/variant.h b/source/core/variant.h index 2e9caaf..443befb 100644 --- a/source/core/variant.h +++ b/source/core/variant.h @@ -50,13 +50,13 @@ private: { return false; } }; - StoreBase *store = 0; + StoreBase *store = nullptr; public: Variant() = default; template Variant(const T &v): store(new Store::type>(v)) { } - Variant(const Variant &v): store(v.store ? v.store->clone() : 0) { } + Variant(const Variant &v): store(v.store ? v.store->clone() : nullptr) { } ~Variant() { delete store; } template @@ -70,7 +70,7 @@ public: Variant &operator=(const Variant &v) { delete store; - store = (v.store ? v.store->clone() : 0); + store = (v.store ? v.store->clone() : nullptr); return *this; } @@ -101,7 +101,7 @@ public: template bool check_type() const { - return dynamic_cast::type> *>(store)!=0; + return dynamic_cast::type> *>(store); } bool check_same_type(const Variant &v) const