Commit 93fd1f3e authored by Francois Keith's avatar Francois Keith
Browse files

Correct the prototype of the method getClassName.

Use the dedicated macro to this purpose.
The error came from the fact that the method was not declared
as const. The consequences were that the following python orders
were possible:

mytask = TaskInequality ('mytask')
mytask = Task ('mytask')

The second line should crash but doesn't, because the method getClassName
called is the one of the mother class.
parent 695b7f18
......@@ -53,15 +53,11 @@ namespace dynamicgraph {
:public Task
,public EntityHelper<TaskInequality>
public: /* --- CONSTRUCTOR ---- */
TaskInequality( const std::string& name );
public: /* --- ENTITY INHERITANCE --- */
static const std::string CLASS_NAME;
virtual const std::string& getClassName( void ) { return CLASS_NAME; }
virtual void display( std::ostream& os ) const;
public: /* --- SIGNALS --- */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment