Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Double entries in Symbols Browser

(1/2) > >>

jomeggs:
The class shown below seems to confuse the Symbols Browser. The function "MyFuncError(...)" appears twice what is caused by the comment /* = NULL */ in function definition just before the closing bracket.

header file

--- Code: ---class Blah
{
 public:
    void MyFuncNormal(char* szNonSense, int* nNoDefault);
    void MyFuncError(char* szNonSense, int* nWithDefaultNull = NULL);
 private:
    bool bIsCheckedByMandrav(void){return false;};
};

--- End code ---

cpp file

--- Code: ---void Blah::MyFuncNormal(char* szNonSense, int* nNoDefault)
{
 return;
}

/* The comment between "nWithDefaultNull" and ")"  confuses the parser: */
void Blah::MyFuncError(char* szNonSense, int* nWithDefaultNull /* = NULL */)
{
 return;
}

--- End code ---

Not a big problem, but I've lots of these comments...

SVN 5082, WINDOWS, wx2.8.7 unicode

MortenMacFly:
Nice catch... Will try to look into.

BTW: NICE (!) example. That's how bug reports should look like.

killerbot:
there are already examples of this.

even when you change the name of a function parameter, that is f(int x) in the header and f(int y) in the cpp file.
The parser does not take into account the arguments, their types, their names, and as shown here when in the header a default value is applied to an argument.

Sadly, because once this would work a lot of other things will become possible.

MortenMacFly:

--- Quote from: killerbot on September 24, 2008, 02:05:19 pm ---there are already examples of this.

--- End quote ---
Careful! The problem here is that due to the comment the parser (actually the tokenizer) recognises the implementation arguments as:
(arg, arg, arg))
(notice the double ")") instead of:
(arg, arg, arg)
Thus is becomes an "unknown" function as it is a new signature.

What you want (truly interpret the args as a signature) won't be easily done.

MortenMacFly:
Spotted and fixed in SVN head. :D
Thanks for the report.

Navigation

[0] Message Index

[#] Next page

Go to full version