Author Topic: function tooltip  (Read 3305 times)

Offline killerbot

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

Code: [Select]
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 :
Quote
class SerialCommunicator {...}

Is this done on purpose or is this a mistake ?



Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5295
  • 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.
Code: [Select]
class SerialCommunicator{
public:
       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.