File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1522,7 +1522,7 @@ namespace simplecpp {
15221522 throw std::runtime_error (" bad macro syntax. macroname=" + name + " value=" + value);
15231523 }
15241524
1525- Macro (const Macro &other) : files(other.files), tokenListDefine(other.tokenListDefine), valueDefinedInCode_(other.valueDefinedInCode_) {
1525+ Macro (const Macro &other) : files(other.files), valueDefinedInCode_(other.valueDefinedInCode_) {
15261526 // TODO: remove the try-catch - see #537
15271527 // avoid bugprone-exception-escape clang-tidy warning
15281528 try {
@@ -1540,10 +1540,10 @@ namespace simplecpp {
15401540 if (this != &other) {
15411541 files = other.files ;
15421542 valueDefinedInCode_ = other.valueDefinedInCode_ ;
1543- if (other.tokenListDefine ->empty ())
1543+ tokenListDefine = other.tokenListDefine ;
1544+ if (!tokenListDefine || tokenListDefine->empty ())
15441545 parseDefine (other.nameTokDef );
15451546 else {
1546- tokenListDefine = other.tokenListDefine ;
15471547 parseDefine (tokenListDefine->cfront ());
15481548 }
15491549 usageList = other.usageList ;
You can’t perform that action at this time.
0 commit comments