Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: MortenMacFly on March 31, 2006, 08:16:34 pm

Title: Too many SANITY_CHECK()'s in cbworkspace.cpp?
Post by: MortenMacFly on March 31, 2006, 08:16:34 pm
Looking into cbworkspace.cpp at lines 106-113 I see:
Code
  m_IsOK = pWsp && (pWsp->Open(fname) || m_IsDefault);
  SANITY_CHECK();
  m_Title = pWsp ? pWsp->GetTitle() : wxString(wxEmptyString);
  SANITY_CHECK();

  SANITY_CHECK();
  m_Filename.SetExt(FileFilters::WORKSPACE_EXT);
  SetModified(modified);
Not that it is really of concern, but aren't these too many SANITY_CHECK()'s? I believe at least the two in the middle could be reduced to one. Otherwise it looks like kind of INSANITY_CHECK() to me... ;-)
With kind regards, Morten.
(Version 1.0 revision 2285 (gcc 3.4.5 Windows/unicode, build: Mar 30 2006 18:55:32))
Edit: Typos.