Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
BUG: Auto-Completion with namespace
ollydbg:
Another change I think is wrong:
--- Code: ----- a/src/plugins/codecompletion/nativeparser.cpp
+++ b/src/plugins/codecompletion/nativeparser.cpp
@@ -1917,8 +1917,8 @@ static bool IsOperatorEnd(int startAt, const wxString& line)
}
static bool IsOperatorBegin(int startAt, const wxString& line)
{
- return ( (startAt > 0)
- && ((size_t)startAt + 1< line.Len())
+ return ( (startAt >= 0)
+ && ((size_t)startAt < line.Len())
&& ( ( (line.GetChar(startAt ) == '-')
&& (line.GetChar(startAt + 1) == '>') )
|| ( (line.GetChar(startAt) == ':')
--- End code ---
startAt could be 0, that's Ok, but we later use line.GetChar(startAt + 1), so it should be the condition (size_t)startAt + 1< line.Len().
ollydbg:
--- Code: ---int main()
{
:: // cc here
return 0;
}
--- End code ---
If cc after the double colon, then the code goes here:
--- Code: --- else if (lineFirstChar == _T(':') && curChar == _T(':'))
return;
--- End code ---
So, I guess this "else if" condition is going to skip this condition?
If true, I think the logic is not correct, the correct way should be:
--- Code: --- else if (lineFirstChar == _T(':') && curChar == _T(':') && "there is no extra char between linFirstChar and curChar")
return;
--- End code ---
What's your opinion?
Navigation
[0] Message Index
[*] Previous page
Go to full version