- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
void insertObject(Object object)
{
+ auto found = std::find_if(
+ objects.begin(),
+ objects.end(),
+ [&object](Object otherObject)
+ {
+ return otherObject == object;
+ }
+ );
+
+ if (found != objects.end())
+ return;
+
objects.push_back(object);
}