Author Topic: function tooltip  (Read 7363 times)

Online killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5506
function tooltip
« on: January 25, 2010, 12:10:08 pm »
Assume the following code :

		ISerialCommunicator* Comm = new SerialCommunicator(
Engine->s_ComPort, m_BaudRate, m_DoCommunicationLogging, "");

When mouse hovering over 'SerialCommunicator' one does NOT get the tooltip of the constructor of this class, but a tooltip saying :
class SerialCommunicator {...}

Is this done on purpose or is this a mistake ?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5931
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: function tooltip
« Reply #1 on: January 25, 2010, 02:38:25 pm »
I think there's mistake of the parser.
class SerialCommunicator{
       void SerialCommunicator(XXXX);

For these kind of statement, thereā€˜s two tokens (the class declaration and the constructor) should be added. So, the function tooltip should match two entries in the token tree.

You can select the "SerialCommunicator", and right click, and select context menu: see deceleration of "SerialCommunicator".
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.