We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b37d06 commit 7ffbab7Copy full SHA for 7ffbab7
include/Freyr/Containers/ComponentArray.hpp
@@ -47,7 +47,7 @@ namespace FREYR_NAMESPACE
47
48
ComponentId GetComponentId() override { return fr::GetComponentId<T>(); }
49
50
- T& operator[](size_t index) { return mComponents[index]; }
+ T& operator[](size_t index) { return mComponents.data()[index]; }
51
52
void Resize(size_t size) override { mComponents.resize(size); }
53
@@ -62,7 +62,7 @@ namespace FREYR_NAMESPACE
62
{
63
FREYR_ASSERT(index < mComponents.size() && "Accessing non-existent component.");
64
65
- return mComponents[index];
+ return mComponents.data()[index];
66
}
67
68
void CopyComponent(const size_t from, const size_t to, IComponentArray* componentArray) override
0 commit comments