From 2f9038c47246db9723f46e3c2c34463c6cea42e6 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 27 Mar 2024 21:13:05 +0100 Subject: [PATCH] use `StdStringStream` in `Macro` --- simplecpp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simplecpp.cpp b/simplecpp.cpp index c2e1bca..1c006b0 100755 --- a/simplecpp.cpp +++ b/simplecpp.cpp @@ -1481,8 +1481,7 @@ namespace simplecpp { Macro(const std::string &name, const std::string &value, std::vector &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);