Make style variable a std::string
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index a4116f3..3d989d3 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -995,12 +995,11 @@
substituteName.Set((char *)s2);
res = FcPatternGetString(set->fonts[i], FC_STYLE, 0, &s2);
if (res == FcResultMatch && s2) {
- GooString *style = new GooString((char *)s2);
- if (style->cmp("Regular") != 0) {
+ const std::string style = { (char *)s2 };
+ if (style != "Regular") {
substituteName.append(" ");
substituteName.append(style);
}
- delete style;
}
}
}