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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • 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: [Select]
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: 9606
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ