Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/ucioption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,18 @@ usize OptionsMap::count(const std::string& name) const { return options_map.coun

Option::Option(const char* v, OnChange f) :
type("string"),
min(0),
max(0),
on_change(std::move(f)) {
defaultValue = currentValue = v;
}

Option::Option(bool v, OnChange f) :
type("check"),
min(0),
max(0),
on_change(std::move(f)) {
defaultValue = currentValue = (v ? "true" : "false");
}

Option::Option(OnChange f) :
type("button"),
min(0),
max(0),
on_change(std::move(f)) {}

Option::Option(int v, int minv, int maxv, OnChange f) :
Expand All @@ -118,8 +112,6 @@ Option::Option(int v, int minv, int maxv, OnChange f) :

Option::Option(const char* v, const char* cur, OnChange f) :
type("combo"),
min(0),
max(0),
on_change(std::move(f)) {
defaultValue = v;
currentValue = cur;
Expand Down
4 changes: 2 additions & 2 deletions src/ucioption.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class Option {


std::string defaultValue, currentValue, type;
int min, max;
usize idx;
int min = 0, max = 0;
usize idx = 0;
OnChange on_change;
const OptionsMap* parent = nullptr;
};
Expand Down
Loading