1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00
Files
godot/core/vector.h
Hein-Pieter van Braam 3ef7ecf546 Don't allocate in Vector's ctor
By relying on the fact that a struct or class's first member has the
same address as the struct itself we can cast VectorWriteProxy<T> to
Vector<T> and access the CowData field.

This allows a Vector to be moved in memory without invalidating the
pointer to the cowdata field.
2018-12-14 20:07:35 +00:00

5.2 KiB