diff --git a/generator/parser/rpp/pp-internal.h b/generator/parser/rpp/pp-internal.h index 47ae7940e..4821ccb26 100644 --- a/generator/parser/rpp/pp-internal.h +++ b/generator/parser/rpp/pp-internal.h @@ -98,19 +98,19 @@ inline bool comment_p (InputIterator _first, InputIterator _last) /*const*/ return (*_first == '/' || *_first == '*'); } -struct _Compare_string: public std::binary_function +struct _Compare_string { inline bool operator () (pp_fast_string const *__lhs, pp_fast_string const *__rhs) const { return *__lhs < *__rhs; } }; -struct _Equal_to_string: public std::binary_function +struct _Equal_to_string { inline bool operator () (pp_fast_string const *__lhs, pp_fast_string const *__rhs) const { return *__lhs == *__rhs; } }; -struct _Hash_string: public std::unary_function +struct _Hash_string { inline std::size_t operator () (pp_fast_string const *__s) const { diff --git a/generator/typesystem.cpp b/generator/typesystem.cpp index ae4a798e2..c3f6ded94 100644 --- a/generator/typesystem.cpp +++ b/generator/typesystem.cpp @@ -462,7 +462,7 @@ bool Handler::startElement(const QString &, const QString &n, return importFileElement(atts); } - std::auto_ptr element(new StackElement(current)); + std::unique_ptr element(new StackElement(current)); if (!tagNames.contains(tagName)) { m_error = QString("Unknown tag name: '%1'").arg(tagName); @@ -1502,6 +1502,7 @@ TypeDatabase::TypeDatabase() : m_suppressWarnings(true) bool TypeDatabase::parseFile(const QString &filename, bool generate) { QFile file(filename); + Q_ASSERT(file.exists()); QXmlInputSource source(&file);