News:

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

Main Menu

Reload never works in cc parser test project r7738

Started by ollydbg, January 30, 2012, 03:10:52 PM

Previous topic - Next topic

ollydbg

void Frame::OnMenuReloadSelected(wxCommandEvent& event)
{
    if (!ParserTestAppGlobal::s_fileQueue.IsEmpty())
        Start();
}


Hi, morten, the s_fileQueue is always empty after the first run (you delete/cleam them after the parsing), so you never hit the "Start();" again.
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.

MortenMacFly

Quote from: ollydbg on January 30, 2012, 03:10:52 PM
Hi, morten, the s_fileQueue is always empty after the first run (you delete/cleam them after the parsing), so you never hit the "Start();" again.
Yes, this is a missing change after the last refactoring ::). Just remove the If-clause and it should work again.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]