aboutsummaryrefslogtreecommitdiff
path: root/People.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'People.cpp')
-rw-r--r--People.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/People.cpp b/People.cpp
index 32a9227..7c1a242 100644
--- a/People.cpp
+++ b/People.cpp
@@ -1,3 +1,5 @@
+#include <algorithm>
+
#include "People.h"
#include "Exception.h"
#include "util.h"
@@ -18,6 +20,12 @@ void People::add_artist(ArtistData data) {
this->artists.push_back(new Artist(this->museum, data));
}
+void People::remove_artist(Artist & target) {
+ auto it = find(this->artists.begin(), this->artists.end(), &target);
+ if (it == this->artists.end()) return;
+ this->artists.erase(it);
+}
+
size_t People::artists_size() {
return this->artists.size();
}