Make Codelite compatible with wxUSE_STL

Discussion about CodeLite development process and patches
count0
CodeLite Enthusiast
Posts: 16
Joined: Fri Jul 04, 2008 10:46 am
Contact:

Make Codelite compatible with wxUSE_STL

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make Codelite compatible with wxUSE_STL

Post 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
Make sure you have read the HOW TO POST thread
Post Reply