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 @@ -1513,7 +1513,7 @@ namespace simplecpp {
15131513 throw std::runtime_error (" bad macro syntax. macroname=" + name + " value=" + value);
15141514 }
15151515
1516- Macro (const Macro &other) : files(other.files), tokenListDefine(other.tokenListDefine), valueDefinedInCode_(other.valueDefinedInCode_) {
1516+ Macro (const Macro &other) : files(other.files), valueDefinedInCode_(other.valueDefinedInCode_) {
15171517 // TODO: remove the try-catch - see #537
15181518 // avoid bugprone-exception-escape clang-tidy warning
15191519 try {
@@ -1531,10 +1531,10 @@ namespace simplecpp {
15311531 if (this != &other) {
15321532 files = other.files ;
15331533 valueDefinedInCode_ = other.valueDefinedInCode_ ;
1534- if (other.tokenListDefine ->empty ())
1534+ tokenListDefine = other.tokenListDefine ;
1535+ if (!tokenListDefine || tokenListDefine->empty ())
15351536 parseDefine (other.nameTokDef );
15361537 else {
1537- tokenListDefine = other.tokenListDefine ;
15381538 parseDefine (tokenListDefine->cfront ());
15391539 }
15401540 usageList = other.usageList ;
You can’t perform that action at this time.
0 commit comments