Page 1 of 1

Make Codelite compatible with wxUSE_STL

Posted: Fri Jul 04, 2008 11:13 am
by count0
It seems there is a little code that cannot compile if wxUSE_STL is defined.

Code: Select all

	wxSizerItemList list = mainSizer->GetChildren();
	for ( wxSizerItemList::Node *node = list.GetFirst(); node; node = node->GetNext() ){
		wxSizerItem *current = node->GetData();
		current->GetWindow()->Destroy();
	}
	m_projSettingsMap.clear();
I would suggest change it to:

Code: Select all

	wxSizerItemList list = mainSizer->GetChildren();
	for (size_t i=0; i < list.GetCount(); i++){
		wxSizerItem *current = list[i];
		current->GetWindow()->Destroy();
	}
	m_projSettingsMap.clear();
Opinion?

PS: Which sub-forum is for discussing something like this? I mean the code, patch, and development of Codelite itself.

Re: Make Codelite compatible with wxUSE_STL

Posted: Fri Jul 04, 2008 11:32 am
by eranif
count0 wrote:It seems there is a little code that cannot compile if wxUSE_STL is defined.

Code: Select all

	wxSizerItemList list = mainSizer->GetChildren();
	for ( wxSizerItemList::Node *node = list.GetFirst(); node; node = node->GetNext() ){
		wxSizerItem *current = node->GetData();
		current->GetWindow()->Destroy();
	}
	m_projSettingsMap.clear();
I would suggest change it to:

Code: Select all

	wxSizerItemList list = mainSizer->GetChildren();
	for (size_t i=0; i < list.GetCount(); i++){
		wxSizerItem *current = list[i];
		current->GetWindow()->Destroy();
	}
	m_projSettingsMap.clear();
Opinion?
Thanks I will fix this.
count0 wrote:PS: Which sub-forum is for discussing something like this? I mean the code, patch, and development of Codelite itself.
I added new sub-forum and moved this topic

Eran