Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: Jenna on March 14, 2014, 07:37:17 pm
-
I get the followinhg error with wx3.0 trunk on my linux system (64bit gcc 4.8):
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp: In function 'int CCManagerHelper::CallTipToInt(const wxString&, int)':
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: error: ambiguous overload for 'operator^' (operand types are 'int' and 'wxString::const_iterator::reference {aka wxUniChar}')
val = 33 * val ^ (*itr);
^
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: candidates are:
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, int) <built-in>
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, unsigned int) <built-in>
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, long int) <built-in>
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, long unsigned int) <built-in>
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, long long int) <built-in>
/home/jens/codeblocks-build/codeblocks.git/src/sdk/ccmanager.cpp:72:28: note: operator^(int, long long unsigned int) <built-in>
Casting the (*itr) to int makes the error go away, but as I don't know what this function does, I don't know if this is the corect fix or does something really harmful.
@Alpha and other devs more familiar with CC could you please look into it ?
-
Casting the (*itr) to int makes the error go away, but as I don't know what this function does, I don't know if this is the corect fix or does something really harmful.
@Alpha and other devs more familiar with CC could you please look into it ?
That is the correct fix.
(The function is used to store a dictionary between calltip context, and the previously user selected calltip page. I choose to store an int (hash value) instead of the full strings, because CCManager has no need to waste memory duplicating all displayed calltips.)
Edit: Fix committed.