Skip to content

Commit

Permalink
More efficient syntax for the PrintConfigDef constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Dec 16, 2015
1 parent 934bd43 commit e381100
Show file tree
Hide file tree
Showing 3 changed files with 1,178 additions and 1,167 deletions.
8 changes: 8 additions & 0 deletions xs/src/libslic3r/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ ConfigDef::~ConfigDef()
}
}

ConfigOptionDef*
ConfigDef::add(const t_config_option_key &opt_key, ConfigOptionType type)
{
ConfigOptionDef* opt = &this->options[opt_key];
opt->type = type;
return opt;
}

const ConfigOptionDef*
ConfigDef::get(const t_config_option_key &opt_key) const
{
Expand Down
1 change: 1 addition & 0 deletions xs/src/libslic3r/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ class ConfigDef
public:
t_optiondef_map options;
~ConfigDef();
ConfigOptionDef* add(const t_config_option_key &opt_key, ConfigOptionType type);
const ConfigOptionDef* get(const t_config_option_key &opt_key) const;
};

Expand Down
Loading

0 comments on commit e381100

Please sign in to comment.