mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 06:31:59 +08:00
Added a () operator overload to treat ConfigOptionSingle like functions and return their value (accessor)
This commit is contained in:
parent
84826ae5ee
commit
eab034434a
@ -55,6 +55,7 @@ class ConfigOptionSingle : public ConfigOption {
|
|||||||
T value;
|
T value;
|
||||||
ConfigOptionSingle(T _value) : value(_value) {};
|
ConfigOptionSingle(T _value) : value(_value) {};
|
||||||
operator T() const { return this->value; };
|
operator T() const { return this->value; };
|
||||||
|
T operator()() const { return this->value; };
|
||||||
|
|
||||||
void set(const ConfigOption &option) {
|
void set(const ConfigOption &option) {
|
||||||
const ConfigOptionSingle<T>* other = dynamic_cast< const ConfigOptionSingle<T>* >(&option);
|
const ConfigOptionSingle<T>* other = dynamic_cast< const ConfigOptionSingle<T>* >(&option);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user