Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 29, 2015, 4:47:42 PM (9 years ago)
Author:
landauf
Message:

use '= delete' to explicitly delete unimplemented copy-constructors (for non-copyable classes).
use '= default' to explicitly implement default constructors/destructors.

Location:
code/branches/cpp11_v2/src/libraries/core/command
Files:
7 edited

Legend:

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

    r10768 r10990  
    132132
    133133        private:
    134             CommandExecutor() {}                            ///< Empty constructor
    135             CommandExecutor(const CommandExecutor& other); ///< Not implemented copy-constructor
    136             ~CommandExecutor() {}                           ///< Empty destructor
     134            CommandExecutor() = default;                      ///< Empty constructor
     135            CommandExecutor(const CommandExecutor&) = delete; ///< Not implemented copy-constructor
     136            ~CommandExecutor() = default;                     ///< Empty destructor
    137137
    138138            static CommandExecutor& getInstance();
  • code/branches/cpp11_v2/src/libraries/core/command/Executor.cc

    r10765 r10990  
    6464            defaultValue_[i] = other.defaultValue_[i];
    6565        this->functor_ = other.functor_->clone();
    66     }
    67 
    68     /**
    69         @brief Destructor
    70     */
    71     Executor::~Executor()
    72     {
    7366    }
    7467
  • code/branches/cpp11_v2/src/libraries/core/command/Executor.h

    r10828 r10990  
    100100            Executor(const FunctorPtr& functor, const std::string& name = "");
    101101            Executor(const Executor& other);
    102             virtual ~Executor();
     102            virtual ~Executor() = default;
    103103
    104104            /// Calls the wrapped function with 0 arguments. If the function needs more arguments, the executor's default values are used.
  • code/branches/cpp11_v2/src/libraries/core/command/Functor.h

    r10987 r10990  
    187187
    188188        public:
    189             virtual ~Functor() {}
     189            virtual ~Functor() = default;
    190190
    191191            /// Calls the function-pointer with up to five arguments. In case of a member-function, the assigned object-pointer is used to call the function. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
  • code/branches/cpp11_v2/src/libraries/core/command/IRC.h

    r7401 r10990  
    6565
    6666            IRC();
    67             IRC(const IRC& other);              ///< Copy-constructor: Not implemented
    68             ~IRC() {}                           ///< Destructor
     67            IRC(const IRC&) = delete;
     68            ~IRC() = default;
    6969
    7070            Tcl::interpreter* interpreter_;     ///< The Tcl interpreter that is used for the IRC connection
  • code/branches/cpp11_v2/src/libraries/core/command/Shell.h

    r10845 r10990  
    6161
    6262        public:
    63             virtual ~ShellListener() {}
     63            ShellListener() = default;
     64            virtual ~ShellListener() = default;
    6465
    6566        private:
     
    148149
    149150        private:
    150             Shell(const Shell& other);
     151            Shell(const Shell&) = delete;
    151152
    152153            // DevModeListener
  • code/branches/cpp11_v2/src/libraries/core/command/TclBind.h

    r10768 r10990  
    124124
    125125        private:
    126             TclBind(const TclBind& other);      ///< Copy-constructor, not implemented
     126            TclBind(const TclBind&) = delete;
    127127
    128128            static std::string tcl_helper(Tcl::object const &args, bool bQuery);
Note: See TracChangeset for help on using the changeset viewer.