Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump simplecpp to 1.1.2 #5939

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions externals/simplecpp/simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> &files)
: file(fopen(filename.c_str(), "rb"))
, lastCh(0)
, lastStatus(0)
{
if (!file) {
const std::vector<std::string> 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();
}
Expand Down Expand Up @@ -447,7 +447,7 @@ simplecpp::TokenList::TokenList(const std::string &filename, std::vector<std::st
{
try
{
FileStream stream(filename);
FileStream stream(filename, filenames);
readfile(stream,filename,outputList);
}
catch(const simplecpp::Output & e) // TODO handle extra type of errors
Expand Down
2 changes: 1 addition & 1 deletion externals/simplecpp/simplecpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ namespace simplecpp {
EXPLICIT_INCLUDE_NOT_FOUND,
FILE_NOT_FOUND
} type;
explicit Output(const std::vector<std::string> &files, Output::Type id, const std::string & errMsg ) : type(id), location(files), msg(errMsg) {}
explicit Output(const std::vector<std::string>& files, Type type, const std::string& msg) : type(type), location(files), msg(msg) {}
Location location;
std::string msg;
};
Expand Down
Loading