fixed non-existend std::make_unique()

This commit is contained in:
jkriege2 2022-08-20 16:26:07 +02:00
parent 6273e469cd
commit 528eec68d3

View File

@ -268,7 +268,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject {
template <class TParser> template <class TParser>
inline bool parse(const QString &markup, ParseOptions options=DefaultParseOptions) { inline bool parse(const QString &markup, ParseOptions options=DefaultParseOptions) {
static_assert(std::is_base_of<JKQTMathTextParser, TParser>::value, "in parse<TParser>() the type TParser has to be derived from JKQTMathTextParser to work!"); static_assert(std::is_base_of<JKQTMathTextParser, TParser>::value, "in parse<TParser>() the type TParser has to be derived from JKQTMathTextParser to work!");
std::unique_ptr<TParser> p=std::make_unique<TParser>(this); std::unique_ptr<TParser> p=std::unique_ptr<TParser>(new TParser(this));
if (parsedNode) delete parsedNode; if (parsedNode) delete parsedNode;
parsedNode=nullptr; parsedNode=nullptr;
clearErrorList(); clearErrorList();