Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14
diff options
context:
space:
mode:
1 files changed, 4 insertions, 2 deletions
-rw-r--r--Sem. 14/Farm/Collection/Farm.cpp6
diff --git a/Sem. 14/Farm/Collection/Farm.cpp b/Sem. 14/Farm/Collection/Farm.cpp
index b604a2e..6aeb626 100644
--- a/Sem. 14/Farm/Collection/Farm.cpp
+++ b/Sem. 14/Farm/Collection/Farm.cpp
@@ -82,8 +82,10 @@ bool Farm::addAnimal(Animal::AnimalType animalType)
if (animalsCount == capacity)
resize();
animals[animalsCount++] = ptr;
- }
+ return true;
+ }
+ return false;
}
size_t Farm::getCount() const
@@ -94,4 +96,4 @@ size_t Farm::getCount() const
bool Farm::isEmpty() const
{
return animalsCount == 0;
-} \ No newline at end of file
+}