Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

CC fail after A class's static method called.

<< < (5/5)

ollydbg:
This patch can simply fix the bug.


--- Code: ---Index: parserthread.cpp
===================================================================
--- parserthread.cpp (revision 5977)
+++ parserthread.cpp (working copy)
@@ -456,6 +456,9 @@
         if (token==ParserConsts::semicolon)
         {
             m_Str.Clear();
+            // clear typed namespace here
+            while (!m_EncounteredTypeNamespaces.empty())
+                m_EncounteredTypeNamespaces.pop();
         }
         else if (token==ParserConsts::kw_delete ||
                 (token==ParserConsts::dot) ||

--- End code ---


For example:

--- Code: ---    A::Test(); //remove this line, then cc work well.

    globalSoo.aaaa = 9; //cc  allways do work well here

    Soo localeSoo;

    localeSoo.; // <-- cc do nothing
--- End code ---

When we meet the first semicolon, we need to clear the typed namespace, because this is always the end of a statement.

Edit:

Is is possible to add a private function named ClearTypedNamespace() :D
Because these codes exist in many places.

blueshake:
confirm it.Thanks. O(∩_∩)O~

MortenMacFly:

--- Quote from: ollydbg on December 15, 2009, 10:45:41 am ---This patch can simply fix the bug.

--- End quote ---
Confirmed && applied. Thanks! :-)

Navigation

[0] Message Index

[*] Previous page

Go to full version