Explorar el Código

COMP: Added virtual destructor to CommandLineParserArgumentDescriptionBase class

That should fix the following warning:
warning: 'class<unnamed>::CommandLineParserArgumentDescriptionBase' has virtual functions but non-virtual destructor

See http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=642781
Jean-Christophe Fillion-Robin hace 15 años
padre
commit
d7947f32c4
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Libs/Core/ctkCommandLineParser.cpp

+ 2 - 0
Libs/Core/ctkCommandLineParser.cpp

@@ -23,6 +23,7 @@ public:
     this->IgnoreRest = ignoreRest;
     this->IgnoreRest = ignoreRest;
     this->NumberOfParametersToProcess = 0;
     this->NumberOfParametersToProcess = 0;
     }
     }
+  virtual ~CommandLineParserArgumentDescriptionBase(){}
   virtual bool addParameter(const QString& value) = 0;
   virtual bool addParameter(const QString& value) = 0;
   QString helpText(int fieldWidth, const char charPad);
   QString helpText(int fieldWidth, const char charPad);
   QString LongArg;
   QString LongArg;
@@ -89,6 +90,7 @@ QString CommandLineParserArgumentDescriptionBase::helpText(int fieldWidth, const
       this->RegularExpression = _REGEXP;                                                \
       this->RegularExpression = _REGEXP;                                                \
       this->ArgumentType = #_TYPE;                                                      \
       this->ArgumentType = #_TYPE;                                                      \
       }                                                                                 \
       }                                                                                 \
+    virtual ~ CommandLineParser##_NAME##ArgumentDescription(){}                         \
      virtual bool addParameter(const QString& value);                                   \
      virtual bool addParameter(const QString& value);                                   \
     _TYPE* Variable;                                                                    \
     _TYPE* Variable;                                                                    \
     _TYPE DefaultValue;                                                                 \
     _TYPE DefaultValue;                                                                 \