News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

cc code refine

Started by ollydbg, May 29, 2011, 06:56:25 AM

Previous topic - Next topic

ollydbg

When reviewing the cc's code, I think these can be refined.

1, in parser.cpp line 539

       if (!m_IsPriority)
       {
           TRACE(_T("Parse() : Parallel Parsing %s"), bufferOrFilename.wx_str());

           // Add a task for all project files
           if (m_IsFirstBatch)
           {
               m_IsFirstBatch = false;
               m_PoolTask.push(PTVector());
           }

           if (m_IsParsing)
               m_Pool.AddTask(thread, true);
           else
               m_PoolTask.back().push_back(thread);
       }
       else if (m_IsPriority)


m_IsPriority is a bool variable.

2, in tokenizer.h line 470

bool                 m_IsOperator;

this variable is not used any more.
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.

oBFusCATed

Please provide a patch which removes it, so people can test it:)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Loaden


ollydbg

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.