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

View file

@ -122,22 +122,13 @@ struct FontItem
enum class Type;
// Define what is stored in path
Type type;
Type type { Type::undefined };
// User modification of font style
FontProp prop;
FontItem() : type(Type::undefined){} // set undefined type
// when name is empty than Font item was loaded from .3mf file
// and potentionaly it is not reproducable
FontItem(const std::string &name,
const std::string &path,
Type type,
const FontProp & prop)
: name(name), path(path), type(type), prop(prop) // copy values
{}
// define data stored in path
// when wx change way of storing add new descriptor Type
enum class Type {