Skip to content

Commit

Permalink
Small fix to field custom code processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Jan 2, 2025
1 parent 941257d commit 8171bf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/commsdsl2comms/src/CommsField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,11 @@ bool CommsField::commsPrepareOverrideInternal(
break;
}

customCode = bodyFunc(codePathPrefix);
auto bodyContents = bodyFunc(codePathPrefix);
if (!bodyContents.empty()) {
customCode = std::move(bodyContents);
break;
}
} while (false);

if (customCode.empty() && isOverrideCodeRequired(type)) {
Expand Down
6 changes: 5 additions & 1 deletion app/commsdsl2comms/src/CommsMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ bool CommsMessage::commsPrepareOverrideInternal(
break;
}

customCode = bodyFunc(codePathPrefix);
auto bodyContents = bodyFunc(codePathPrefix);
if (!bodyContents.empty()) {
customCode = std::move(bodyContents);
break;
}
} while (false);

if (customCode.empty() && isOverrideCodeRequired(type)) {
Expand Down

0 comments on commit 8171bf3

Please sign in to comment.