Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2015, 11:40:28 AM (9 years ago)
Author:
muemart
Message:

Run clang-modernize -add-override
A few notes:

  • There are probably some overrides missing, especially in funky templatey code
  • Virtual methods with wrong signatures were not fixed, needs to be done by hand (only warnings get emitted)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/command/Functor.h

    r10768 r10817  
    249249
    250250            // see Functor::operator()()
    251             MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null)
     251            MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) override
    252252            {
    253253                // call the function if an object was assigned
     
    262262
    263263            // see Functor::getType()
    264             inline Functor::Type::Enum getType() const
     264            inline Functor::Type::Enum getType() const override
    265265                { return Functor::Type::Member; }
    266266
     
    280280
    281281            // see Functor::setRawObjectPointer()
    282             inline void setRawObjectPointer(void* object)
     282            inline void setRawObjectPointer(void* object) override
    283283                { this->setObject((O*)object); }
    284284            // see Functor::getRawObjectPointer()
    285             inline void* getRawObjectPointer() const
     285            inline void* getRawObjectPointer() const override
    286286                { return this->object_; }
    287287
    288288            // see Functor::setSafeMode()
    289             inline void setSafeMode(bool bSafeMode)
     289            inline void setSafeMode(bool bSafeMode) override
    290290            {
    291291                if (bSafeMode == this->bSafeMode_)
     
    309309
    310310            /// Will be called by Destroyable::~Destroyable() if the stored object is deleted and the Functor is in safe mode.
    311             inline void objectDeleted()
     311            inline void objectDeleted() override
    312312                { this->object_ = nullptr; }
    313313
     
    328328
    329329            // see Functor::operator()()
    330             MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null)
     330            MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) override
    331331            {
    332332                return (*this)((void*)nullptr, param1, param2, param3, param4, param5);
     
    334334
    335335            // see Functor::getType()
    336             inline Functor::Type::Enum getType() const
     336            inline Functor::Type::Enum getType() const override
    337337                { return Functor::Type::Static; }
    338338
    339339            // see Functor::setRawObjectPointer()
    340             inline void setRawObjectPointer(void*)
     340            inline void setRawObjectPointer(void*) override
    341341                { orxout(internal_warning) << "Can't assign an object pointer to a static functor" << endl; }
    342342            // see Functor::getRawObjectPointer()
    343             inline void* getRawObjectPointer() const
     343            inline void* getRawObjectPointer() const override
    344344                { return nullptr; }
    345345
    346346            // see Functor::setSafeMode()
    347             inline void setSafeMode(bool) {}
     347            inline void setSafeMode(bool) override {}
    348348    };
    349349
Note: See TracChangeset for help on using the changeset viewer.