summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-23 15:48:08 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-23 15:48:08 +0200
commit1626707b7f4fd3d2b313e78cb3a41783f072f73b (patch)
treed03ac32a9c898f38216f191949b8c5b2ff89044e /src/helpers
parent72700bf9dc17d1d145130bd53b436a80e1c971d2 (diff)
make layerSurfaces into RAII
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Monitor.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 24e555f9..93736614 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -3,8 +3,9 @@
#include "../defines.hpp"
#include <deque>
#include "WLClasses.hpp"
-#include <list>
+#include <vector>
#include <array>
+#include <memory>
struct SMonitor {
Vector2D vecPosition = Vector2D(0,0);
@@ -38,7 +39,7 @@ struct SMonitor {
// Double-linked list because we need to have constant mem addresses for signals
// We have to store pointers and use raw new/delete because they might be moved between them
// and I am lazy
- std::array<std::list<SLayerSurface*>, 4> m_aLayerSurfaceLists;
+ std::array<std::vector<std::unique_ptr<SLayerSurface>>, 4> m_aLayerSurfaceLists;
DYNLISTENER(monitorFrame);
DYNLISTENER(monitorDestroy);