diff --git a/libs/gfx/include/psemek/gfx/buffer.hpp b/libs/gfx/include/psemek/gfx/buffer.hpp index f71e564b..3772fcc2 100644 --- a/libs/gfx/include/psemek/gfx/buffer.hpp +++ b/libs/gfx/include/psemek/gfx/buffer.hpp @@ -55,13 +55,13 @@ namespace psemek::gfx } template - std::shared_ptr map() + std::shared_ptr map() { if (auto p = mapped_.lock()) - return std::static_pointer_cast(p); + return std::static_pointer_cast(p); bind(); - std::shared_ptr p(reinterpret_cast(gl::MapBuffer(gl::ARRAY_BUFFER, gl::WRITE_ONLY)), [this](T *){ + std::shared_ptr p(reinterpret_cast(gl::MapBuffer(gl::ARRAY_BUFFER, gl::WRITE_ONLY)), [this](T *){ bind(); gl::UnmapBuffer(gl::ARRAY_BUFFER); });