mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
UI: Make undo_stack types in-class and private
Reduces polluting the global namespace
This commit is contained in:
parent
09ffab6f90
commit
8515f38bdb
@ -9,21 +9,20 @@
|
||||
|
||||
#include "ui_OBSBasic.h"
|
||||
|
||||
typedef std::function<void(const std::string &data)> undo_redo_cb;
|
||||
typedef std::function<void(bool is_undo)> func;
|
||||
typedef std::unique_ptr<Ui::OBSBasic> &ui_ptr;
|
||||
class undo_stack {
|
||||
typedef std::function<void(const std::string &data)> undo_redo_cb;
|
||||
typedef std::function<void(bool is_undo)> func;
|
||||
typedef std::unique_ptr<Ui::OBSBasic> &ui_ptr;
|
||||
|
||||
struct undo_redo_t {
|
||||
struct undo_redo_t {
|
||||
QString name;
|
||||
std::string undo_data;
|
||||
std::string redo_data;
|
||||
undo_redo_cb undo;
|
||||
undo_redo_cb redo;
|
||||
func d;
|
||||
};
|
||||
};
|
||||
|
||||
class undo_stack {
|
||||
private:
|
||||
ui_ptr ui;
|
||||
std::deque<undo_redo_t> undo_items;
|
||||
std::deque<undo_redo_t> redo_items;
|
||||
|
Loading…
Reference in New Issue
Block a user