diff options
Diffstat (limited to 'gfx/renderable.cpp')
| -rw-r--r-- | gfx/renderable.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gfx/renderable.cpp b/gfx/renderable.cpp index 4597597..90035c3 100644 --- a/gfx/renderable.cpp +++ b/gfx/renderable.cpp @@ -2,6 +2,7 @@ #include "gl_traits.h" #include "location.h" #include "maths.h" +#include "util.h" std::weak_ptr<Renderable::CommonLocationData> Renderable::commonLocationData; @@ -21,9 +22,7 @@ Renderable::CommonLocation ::operator=(Location const & location) Renderable::Renderable() { - if (!(locationData = commonLocationData.lock())) { - commonLocationData = locationData = std::make_shared<CommonLocationData>(); - } + createIfRequired(locationData, commonLocationData); } GLuint |
