impr: Use smart pointers to allocate Views

This commit is contained in:
WerWolv
2023-04-08 12:08:45 +02:00
parent dfca7e923c
commit 21f38974a8
6 changed files with 22 additions and 27 deletions

View File

@@ -5,6 +5,7 @@
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <string>
@@ -396,7 +397,7 @@ namespace hex {
* @param focused Whether the current view is focused
* @param keyCode The key code of the key that was pressed
*/
static void process(View *currentView, bool ctrl, bool alt, bool shift, bool super, bool focused, u32 keyCode);
static void process(const std::unique_ptr<View> &currentView, bool ctrl, bool alt, bool shift, bool super, bool focused, u32 keyCode);
/**
* @brief Process a key event. This should be called from the main loop.