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