X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Futils.cpp;h=c038f3670ee25598662841a19669e80956e5c9ac;hb=fce575a51ba1f26418869c20e63b9f388e118ab6;hp=7428fbe6a5bdb4f200e8d45a1014ffc8b8d22bef;hpb=eb39f1bb5e6518c5dc4f4dbd3c88912a97192e95;p=architektonas diff --git a/src/utils.cpp b/src/utils.cpp index 7428fbe..c038f36 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1,3 +1,4 @@ +// // utils.cpp: Stuff that's useful to have kicking around, in one spot // // Part of the Architektonas Project @@ -315,6 +316,25 @@ void RemoveSelectedObjects(VPVector & v) } } +// +// This is used to remove hovered objects from one container in order to delete +// them from the same container. +// +void RemoveHoveredObjects(VPVector & v) +{ + VPVectorIter i = v.begin(); + + while (i != v.end()) + { + Object * obj = (Object *)(*i); + + if (obj->hovered) + v.erase(i); + else + i++; + } +} + void SavePointsFrom(VPVector & v, std::vector & save) { save.clear();