Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commita0c8940ae82f867afe01c7a47d9a4a1422db8207 (patch)
Author
 Angel Dimitriev <angel_dimitriev@abv.bg>
2022-06-06 00:40:53 +0300
Committer
 GitHub <noreply@github.com>
2022-06-06 00:40:53 +0300
Filese1e446a1f5d7bc3dee4cf5b7f5bb3baec5fa444e
Object-oriented_programming_FMI-a0c8940ae82f867afe01c7a47d9a4a1422db8207.tar
Object-oriented_programming_FMI-a0c8940ae82f867afe01c7a47d9a4a1422db8207.tar.gz
Object-oriented_programming_FMI-a0c8940ae82f867afe01c7a47d9a4a1422db8207.zip
Parente0aecbfe38dc2646dcc1695af6bfc8c479a464b7 (diff)
Parentbb0dc575e514a1a90464946aa083a5c8555e41e4 (diff)
Merge pull request #14 from Tony5768/patch-3
Update ShapeCollection.cpp
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
+}