File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1511,7 +1511,7 @@ namespace simplecpp {
15111511 throw std::runtime_error (" bad macro syntax. macroname=" + name + " value=" + value);
15121512 }
15131513
1514- Macro (const Macro &other) : files(other.files), tokenListDefine(other.tokenListDefine), valueDefinedInCode_(other.valueDefinedInCode_) {
1514+ Macro (const Macro &other) : files(other.files), valueDefinedInCode_(other.valueDefinedInCode_) {
15151515 // TODO: remove the try-catch - see #537
15161516 // avoid bugprone-exception-escape clang-tidy warning
15171517 try {
@@ -1529,10 +1529,10 @@ namespace simplecpp {
15291529 if (this != &other) {
15301530 files = other.files ;
15311531 valueDefinedInCode_ = other.valueDefinedInCode_ ;
1532- if (other.tokenListDefine ->empty ())
1532+ tokenListDefine = other.tokenListDefine ;
1533+ if (!tokenListDefine || tokenListDefine->empty ())
15331534 parseDefine (other.nameTokDef );
15341535 else {
1535- tokenListDefine = other.tokenListDefine ;
15361536 parseDefine (tokenListDefine->cfront ());
15371537 }
15381538 usageList = other.usageList ;
You can’t perform that action at this time.
0 commit comments