File tree Expand file tree Collapse file tree
src/main/java/org/variantsync/vevos/simulation/variability/pc/variantlines Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import org .prop4j .Node ;
44import org .variantsync .vevos .simulation .util .fide .FormulaUtils ;
5+ import org .variantsync .vevos .simulation .util .fide .bugfix .FixTrueFalse ;
56import org .variantsync .vevos .simulation .variability .pc .options .VariantGenerationOptions ;
67
78import java .util .ArrayList ;
@@ -15,18 +16,24 @@ public record VariantAnnotation(
1516 public List <String > project (final VariantGenerationOptions projectionOptions , final List <String > splFileLines ) {
1617 final List <String > result = new ArrayList <>();
1718
18- if (projectionOptions .withMacros ()) {
19+ final boolean genMacro = projectionOptions .withMacros () && !isTrue ();
20+
21+ if (genMacro ) {
1922 result .add ("#if " + FormulaUtils .toCPPString (condition ));
2023 }
2124
2225 for (final VariantLineChunk child : lines ) {
2326 result .addAll (child .project (projectionOptions , splFileLines ));
2427 }
2528
26- if (projectionOptions . withMacros () ) {
29+ if (genMacro ) {
2730 result .add ("#endif" );
2831 }
2932
3033 return result ;
3134 }
35+
36+ public boolean isTrue () {
37+ return FixTrueFalse .isTrue (condition );
38+ }
3239}
You can’t perform that action at this time.
0 commit comments