FontItem improvmement: Use default constructors to let the compiler

generate move constructor and move assignement.
Also used some move operators to reduce unnecessary memory allocations.

Cherry picked commit: 120a85d4c4b90ffafced442ee5e63e5f794f6945
This commit is contained in:
Vojtech Bubnik 2022-03-01 16:41:52 +01:00 committed by Filip Sykala
parent 96c5744684
commit c11948a084
6 changed files with 9 additions and 18 deletions
src/slic3r/GUI/Gizmos

View file

@ -1912,7 +1912,7 @@ bool GLGizmoEmboss::choose_true_type_file()
std::string name = get_file_name(path);
//make_unique_name(name, m_font_list);
const FontProp& prop = m_font_manager.get_font_prop();
FontItem fi(name, path, FontItem::Type::file_path, prop);
FontItem fi{ name, path, FontItem::Type::file_path, prop };
m_font_manager.add_font(fi);
// set first valid added font as active
if (m_font_manager.load_font(index)) return true;