Răsfoiți Sursa

Fixed V591: Non-void function should return a value

If there is needed to prevent the copying of the object, then there is no need to provide the definition of the copy constructor and the assignment operator, because the member functions and friendly functions can still call them. If the code is compiled by a compiler with support for the C++11 standard, you can delete them using the keyword 'delete'
Phillip Khandeliants 8 ani în urmă
părinte
comite
cf776cf8b0
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      Engine/source/core/util/tSignal.h

+ 2 - 2
Engine/source/core/util/tSignal.h

@@ -161,8 +161,8 @@ protected:
    SignalSig *mSignal;
 
 private:
-   SignalSlot( const SignalSlot&) {}
-   SignalSlot& operator=( const SignalSlot&) {}
+   SignalSlot( const SignalSlot&);
+   SignalSlot& operator=( const SignalSlot&);
 };
 
 template<typename Signature> class SignalBaseT : public SignalBase