Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (8 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/util/MultiType.h

    r10197 r10768  
    266266
    267267            /// Default constructor: Assigns no value and no type. The type will be determined by the first assignment of a value.
    268             inline MultiType()                       : value_(0) { }
     268            inline MultiType()                       : value_(nullptr) { }
    269269            /// Constructor: Assigns the given value and sets the type.
    270270            template <typename V>
    271             inline MultiType(const V& value)         : value_(0) { this->set(value); }
     271            inline MultiType(const V& value)         : value_(nullptr) { this->set(value); }
    272272            /// Copyconstructor: Assigns value and type of the other MultiType.
    273             inline MultiType(const MultiType& other) : value_(0) { this->set(other); }
     273            inline MultiType(const MultiType& other) : value_(nullptr) { this->set(other); }
    274274
    275275            /// Destructor: Deletes the MT_Value.
     
    325325                if (this->value_)
    326326                    delete this->value_;
    327                 this->value_ = (other.value_) ? other.value_->clone() : 0;
     327                this->value_ = (other.value_) ? other.value_->clone() : nullptr;
    328328            }
    329329
     
    332332
    333333            /// Resets value and type. Type will be void afterwards and null() returns true.
    334             inline void reset() { if (this->value_) delete this->value_; this->value_ = 0; }
     334            inline void reset() { if (this->value_) delete this->value_; this->value_ = nullptr; }
    335335            /// Resets the value and changes the internal type to T.
    336336            template <typename T> inline void reset() { this->assignValue(typename Loki::TypeTraits<T>::UnqualifiedReferredType()); }
     
    486486    template <> inline long double          MultiType::get() const { return (this->value_ ? this->value_->get<long double>()          : 0); }
    487487    template <> inline bool                 MultiType::get() const { return (this->value_ ? this->value_->get<bool>()                 : 0); }
    488     template <> inline void*                MultiType::get() const { return (this->value_ ? this->value_->get<void*>()                : 0); }
     488    template <> inline void*                MultiType::get() const { return (this->value_ ? this->value_->get<void*>()                : nullptr); }
    489489    template <> inline std::string          MultiType::get() const { return (this->value_ ? this->value_->get<std::string>()          : NilValue<std::string>()); }
    490490    template <> inline orxonox::Vector2     MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Vector2>()     : NilValue<orxonox::Vector2>()); }
Note: See TracChangeset for help on using the changeset viewer.