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)
Location:
code/branches/cpp11_v2/src/libraries/core/command
Files:
6 edited

Legend:

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

    r10765 r10817  
    316316            ~StaticallyInitializedConsoleCommand() { delete command_; }
    317317
    318             virtual void load();
    319             virtual void unload();
     318            virtual void load() override;
     319            virtual void unload() override;
    320320
    321321            inline ConsoleCommand& getCommand()
  • code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandManager.h

    r10769 r10817  
    3838
    3939#include "util/Singleton.h"
     40
     41#include <map>
    4042
    4143namespace orxonox
  • 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
  • code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.h

    r8858 r10817  
    6565
    6666        // Methods from ShellListener
    67         void linesChanged();
    68         void lineAdded();
    69         void inputChanged();
    70         void cursorChanged();
    71         void executed();
    72         void exit();
     67        void linesChanged() override;
     68        void lineAdded() override;
     69        void inputChanged() override;
     70        void cursorChanged() override;
     71        void executed() override;
     72        void exit() override;
    7373
    7474        bool willPrintStatusLines();
  • code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.h

    r9676 r10817  
    6767
    6868        // Methods from ShellListener
    69         void linesChanged();
    70         void lineAdded();
    71         void inputChanged();
    72         void cursorChanged();
    73         void executed();
    74         void exit();
     69        void linesChanged() override;
     70        void lineAdded() override;
     71        void inputChanged() override;
     72        void cursorChanged() override;
     73        void executed() override;
     74        void exit() override;
    7575
    7676        void resetTerminalMode();
  • code/branches/cpp11_v2/src/libraries/core/command/Shell.h

    r10769 r10817  
    151151
    152152            // DevModeListener
    153             void devModeChanged(bool value);
     153            void devModeChanged(bool value) override;
    154154
    155155            void addToHistory(const std::string& command);
     
    157157            void clearInput();
    158158            // BaseWriter
    159             virtual void printLine(const std::string& line, OutputLevel level);
     159            virtual void printLine(const std::string& line, OutputLevel level) override;
    160160
    161161            void configureInputBuffer();
Note: See TracChangeset for help on using the changeset viewer.