File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1514,7 +1514,7 @@ namespace simplecpp {
15141514 throw std::runtime_error (" bad macro syntax. macroname=" + name + " value=" + value);
15151515 }
15161516
1517- Macro (const Macro &other) : files(other.files), tokenListDefine(other.tokenListDefine), valueDefinedInCode_(other.valueDefinedInCode_) {
1517+ Macro (const Macro &other) : files(other.files), valueDefinedInCode_(other.valueDefinedInCode_) {
15181518 // TODO: remove the try-catch - see #537
15191519 // avoid bugprone-exception-escape clang-tidy warning
15201520 try {
@@ -1532,10 +1532,10 @@ namespace simplecpp {
15321532 if (this != &other) {
15331533 files = other.files ;
15341534 valueDefinedInCode_ = other.valueDefinedInCode_ ;
1535- if (other.tokenListDefine ->empty ())
1535+ tokenListDefine = other.tokenListDefine ;
1536+ if (!tokenListDefine || tokenListDefine->empty ())
15361537 parseDefine (other.nameTokDef );
15371538 else {
1538- tokenListDefine = other.tokenListDefine ;
15391539 parseDefine (tokenListDefine->cfront ());
15401540 }
15411541 usageList = other.usageList ;
You can’t perform that action at this time.
0 commit comments