mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Integrated SLAPrint into background processing.
Fixed couple of compiler warnings.
This commit is contained in:
parent
811404d97a
commit
bbfbe88a5f
24 changed files with 283 additions and 89 deletions
|
@ -763,7 +763,7 @@ public:
|
|||
}
|
||||
|
||||
//FIXME this smells, the parent class has the method declared returning (unsigned char&).
|
||||
bool get_at(size_t i) const { return bool((i < this->values.size()) ? this->values[i] : this->values.front()); }
|
||||
bool get_at(size_t i) const { return ((i < this->values.size()) ? this->values[i] : this->values.front()) != 0; }
|
||||
|
||||
std::string serialize() const override
|
||||
{
|
||||
|
@ -1272,6 +1272,9 @@ public:
|
|||
int& opt_int(const t_config_option_key &opt_key, unsigned int idx) { return this->option<ConfigOptionInts>(opt_key)->get_at(idx); }
|
||||
const int opt_int(const t_config_option_key &opt_key, unsigned int idx) const { return dynamic_cast<const ConfigOptionInts*>(this->option(opt_key))->get_at(idx); }
|
||||
|
||||
template<typename ENUM>
|
||||
ENUM opt_enum(const t_config_option_key &opt_key) const { return (ENUM)dynamic_cast<const ConfigOptionEnumGeneric*>(this->option(opt_key))->value; }
|
||||
|
||||
bool opt_bool(const t_config_option_key &opt_key) const { return this->option<ConfigOptionBool>(opt_key)->value != 0; }
|
||||
bool opt_bool(const t_config_option_key &opt_key, unsigned int idx) const { return this->option<ConfigOptionBools>(opt_key)->get_at(idx) != 0; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue