[LuaGUIState] Memory error fixed by using std::deque instead of std::vector.

This commit is contained in:
Quentin Bazin 2020-01-23 03:28:23 +09:00
parent 415a6c6d9b
commit 83dd38afd7

View File

@ -14,6 +14,7 @@
#ifndef LUAGUISTATE_HPP_
#define LUAGUISTATE_HPP_
#include <deque>
#include <memory>
#include <gk/graphics/RectangleShape.hpp>
@ -46,8 +47,8 @@ class LuaGUIState : public InterfaceState {
MouseItemWidget m_mouseItemWidget{&m_mainWidget};
std::vector<CraftingWidget> m_craftingWidgets;
std::vector<InventoryWidget> m_inventoryWidgets;
std::deque<CraftingWidget> m_craftingWidgets;
std::deque<InventoryWidget> m_inventoryWidgets;
std::vector<std::unique_ptr<Widget>> m_widgets;
std::vector<std::unique_ptr<gk::Drawable>> m_drawables;