Author Topic: Reload never works in cc parser test project r7738  (Read 6976 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Reload never works in cc parser test project r7738
« on: January 30, 2012, 03:10:52 pm »
Code
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Reload never works in cc parser test project r7738
« Reply #1 on: January 30, 2012, 04:30:27 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ