From eed9c4d0b4c1e9f08ea2a20e57758fd290ddbe3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 2 Feb 2024 15:53:43 +0100 Subject: [PATCH] bump simplecpp to 1.1.2 (#5939) --- externals/simplecpp/simplecpp.cpp | 8 ++++---- externals/simplecpp/simplecpp.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index d9fd008766e..d8363267328 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -380,14 +380,14 @@ class StdIStream : public simplecpp::TokenList::Stream { class FileStream : public simplecpp::TokenList::Stream { public: // cppcheck-suppress uninitDerivedMemberVar - we call Stream::init() to initialize the private members - EXPLICIT FileStream(const std::string &filename) + EXPLICIT FileStream(const std::string &filename, std::vector &files) : file(fopen(filename.c_str(), "rb")) , lastCh(0) , lastStatus(0) { if (!file) { - const std::vector location; - throw simplecpp::Output(location, simplecpp::Output::FILE_NOT_FOUND, "File is missing: " + filename); + files.push_back(filename); + throw simplecpp::Output(files, simplecpp::Output::FILE_NOT_FOUND, "File is missing: " + filename); } init(); } @@ -447,7 +447,7 @@ simplecpp::TokenList::TokenList(const std::string &filename, std::vector &files, Output::Type id, const std::string & errMsg ) : type(id), location(files), msg(errMsg) {} + explicit Output(const std::vector& files, Type type, const std::string& msg) : type(type), location(files), msg(msg) {} Location location; std::string msg; };