Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 13
diff options
context:
space:
mode:
Commit30601882aa51c1c6aa646c3bb6001f2c848adde7 (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2022-06-06 10:43:08 +0300
Committer
 angeld55 <angel_dimitriev@abv.bg>
2022-06-06 10:43:08 +0300
Filesaee8be92c584b6d54ffc93a42f9f1728bc21731e /Sem. 13
Object-oriented_programming_FMI-30601882aa51c1c6aa646c3bb6001f2c848adde7.tar
Object-oriented_programming_FMI-30601882aa51c1c6aa646c3bb6001f2c848adde7.tar.gz
Object-oriented_programming_FMI-30601882aa51c1c6aa646c3bb6001f2c848adde7.zip
Parentc8430b4df4fae035bab0221385d5f538769aa7fc (diff)
Parent5c6da013a652b41281a01b16e028a03c15642172 (diff)
Merge branch 'master' of https://github.com/Angeld55/Object-oriented_programming_FMI
1 files changed, 2 insertions, 2 deletions
-rw-r--r--Sem. 13/ShapeCollection/ShapeCollection.cpp4
diff --git a/Sem. 13/ShapeCollection/ShapeCollection.cpp b/Sem. 13/ShapeCollection/ShapeCollection.cpp
index babe36d..1239fbf 100644
--- a/Sem. 13/ShapeCollection/ShapeCollection.cpp
+++ b/Sem. 13/ShapeCollection/ShapeCollection.cpp
@@ -13,7 +13,7 @@ void ShapeCollection::free()
}
void ShapeCollection::copyFrom(const ShapeCollection& other)
{
- shapes = new Shape* [other.shapesCount];
+ shapes = new Shape* [other.capacity];
shapesCount = other.shapesCount;
capacity = other.capacity;
@@ -99,4 +99,4 @@ double ShapeCollection::getIfPointInShapeByIndex(size_t ind, int x, int y) const
if (ind >= shapesCount)
throw std::out_of_range("Out of range in shapes collection");
return shapes[ind]->isPointIn(x, y);
-} \ No newline at end of file
+}