void load_widget_definitions(tgui_definition& gui_definition, const std::string& definition_type, const config& cfg, const char* key) { std::vector<tcontrol_definition_ptr> definitions; for (const auto & definition : cfg.child_range(key ? key : definition_type + "_definition")) { definitions.push_back(std::make_shared<T>(definition)); } load_widget_definitions(gui_definition, definition_type, definitions); }
void load_widget_definitions(tgui_definition& gui_definition, const std::string& definition_type, const config& cfg, const char* key) { std::vector<tcontrol_definition_ptr> definitions; FOREACH(const AUTO & definition, cfg.child_range(key ? key : definition_type + "_definition")) { definitions.push_back(new T(definition)); } load_widget_definitions(gui_definition, definition_type, definitions); }