Author Topic: return value of cbToolPlugin::Execute()  (Read 2524 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
return value of cbToolPlugin::Execute()
« on: September 23, 2015, 10:57:58 pm »
Hi everyone,

is there any specification as to which are the return values of the function cbToolPlugin::Execute() ?

In the place of the declaration no comments regarding this point are given.

Best regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: return value of cbToolPlugin::Execute()
« Reply #1 on: September 30, 2015, 01:45:44 pm »
wow, what a great interest... ;)

I didn't think my question was that stupid...

if the function returns an int, well, i thought the api should say something about the expected values of that int...

but obviously I'm mistaken... or the devs don't care for that return value... but why does it return a value then... ?

regards

frihjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5247
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: return value of cbToolPlugin::Execute()
« Reply #2 on: September 30, 2015, 03:23:09 pm »
The question is why you are so care about the return value?  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12122
    • Travis build status
Re: return value of cbToolPlugin::Execute()
« Reply #3 on: September 30, 2015, 08:43:32 pm »
As far as I can see the return value is ignored in MainFrame::OnPluginsExecuteMenu.
Probably somebody thought it might be useful for something in the future.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: return value of cbToolPlugin::Execute()
« Reply #4 on: October 01, 2015, 11:44:16 am »
OK, thx for your answers...  ;)

for time being, I'll ignore the return value too.

Maybe someone should put a comment on this some where though...
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100