From 160485f469e90d18280396bb5d38d217a8964bea Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 17 May 2002 16:30:24 +0000 Subject: minor intel compiler fix --- src/Screen.cc | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/Screen.cc b/src/Screen.cc index 6c9cc60..d96029e 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.51 2002/05/17 11:02:30 fluxgen Exp $ +// $Id: Screen.cc,v 1.52 2002/05/17 16:30:24 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -492,6 +492,32 @@ BScreen::~BScreen(void) { removeWorkspaceNames(); +#ifdef __INTEL_COMPILER + //Didn't got icc to work with std::for_each + //so we do this by hand. + + Workspaces::iterator w_it = workspacesList.begin(); + Workspaces::iterator w_it_end = workspacesList.end(); + for(; w_it != w_it_end; ++w_it) { + delete (*w_it); + } + workspacesList.clear(); + + Icons::iterator i_it = iconList.begin(); + Icons::iterator i_it_end = iconList.end(); + for(; i_it != i_it_end; ++i_it) { + delete (*i_it); + } + iconList.clear(); + + Netizens::iterator n_it = netizenList.begin(); + Netizens::iterator n_it_end = netizenList.end(); + for(; n_it != n_it_end; ++n_it) { + delete (*n_it); + } + netizenList.clear(); + +#else //__INTEL_COMPILER std::for_each( workspacesList.begin(), workspacesList.end(), @@ -508,6 +534,7 @@ BScreen::~BScreen(void) { netizenList.begin(), netizenList.end(), delete_obj); +#endif //!__INTEL_COMPILER delete rootmenu; delete workspacemenu; -- cgit v0.11.2