Skip to content

Commit

Permalink
use StdStringStream in Macro
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Mar 27, 2024
1 parent c55edc1 commit 2f9038c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,7 @@ namespace simplecpp {

Macro(const std::string &name, const std::string &value, std::vector<std::string> &f) : nameTokDef(nullptr), files(f), tokenListDefine(f), valueDefinedInCode_(false) {
const std::string def(name + ' ' + value);
std::istringstream istr(def);
StdIStream stream(istr);
StdStringStream stream(def);
tokenListDefine.readfile(stream);
if (!parseDefine(tokenListDefine.cfront()))
throw std::runtime_error("bad macro syntax. macroname=" + name + " value=" + value);
Expand Down

0 comments on commit 2f9038c

Please sign in to comment.