Menu

#191 Constant Correctness Tango:Util.trigger_attr_polling

closed
5
2013-06-04
2008-09-19
No

trigger_attr_polling(bla, name) expects a reference to string (string &) as parameter. This really should be "string const & attr_name" because trigger_attr_polling does not modify this data and literal strings such as "_EG_FVS" could be handed without creating a string just to have a valid reference.

Compare
string s_EG_FVS("_EG_FVS");
util.trigger_attr_polling( this, string("_EG_FVS") );

with

util.trigger_attr_polling( this, "_EG_FVS");

Discussion

  • Emmanuel Taurel

    Emmanuel Taurel - 2008-09-19

    Hola,

    100% correct. Will be fixed in next release.
    If you find some other places, please tell us (I am sure they are some)

    Emmanuel Taurel

     
  • Emmanuel Taurel

    Emmanuel Taurel - 2009-04-21
    • status: open --> closed
     

Log in to post a comment.