From f4fc23ce0d57696f9315e5107900371f449f28b2 Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Tue, 8 Mar 2022 09:28:46 +0100 Subject: [PATCH] fix init of string --- src/libslic3r/Format/3mf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp index 7535553d9..037108114 100644 --- a/src/libslic3r/Format/3mf.cpp +++ b/src/libslic3r/Format/3mf.cpp @@ -3391,11 +3391,11 @@ std::optional TextConfigurationSerialization::read(const char std::string weight = get_attribute_value_string(attributes, num_attributes, FONT_WEIGHT_ATTR); if (!weight.empty()) fp.weight = weight; - std::string font_name = ""; + std::string style_name{}; // should store .3mf file name std::string font_descriptor = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_ATTR); std::string type_str = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_TYPE_ATTR); FontItem::Type type = TextConfigurationSerialization::get_type(type_str); - FontItem fi(font_name, font_descriptor, type, fp); + FontItem fi(style_name, font_descriptor, type, fp); std::string text = get_attribute_value_string(attributes, num_attributes, TEXT_DATA_ATTR); return TextConfiguration(fi, text);