From 9ff659bba7c48062eb87f4373c8222941a259179 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 1 Jan 2003 18:47:50 +0000 Subject: [PATCH] Work around G++ 2.95 bug by removing use of STL find() function. --- src/Model/modelmgr.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 612992301..29693ecf1 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -11,8 +11,6 @@ #include "modelmgr.hxx" #include "model.hxx" -SG_USING_STD(find); - FGModelMgr::FGModelMgr () : _selector(new ssgSelector) @@ -135,8 +133,14 @@ FGModelMgr::add_instance (Instance * instance) void FGModelMgr::remove_instance (Instance * instance) { - _instances.erase(find(_instances.begin(), _instances.end(), instance)); - delete instance; + vector::iterator it; + for (it = _instances.begin(); it != _instances.end(); it++) { + if (*it == instance) { + _instances.erase(it); + delete instance; + return; + } + } } void -- 2.39.5