File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2793,7 +2793,24 @@ private void writeTokenDisplay(
27932793
27942794 case BEGIN_SET :
27952795 case BEGIN_COMPOSITE :
2796- sb .append (indent ).append ("builder << " ).append (fieldName ).append ("();\n " );
2796+ if (0 == typeToken .version ())
2797+ {
2798+ sb .append (indent ).append ("builder << " ).append (fieldName ).append ("();\n " );
2799+ }
2800+ else
2801+ {
2802+ new Formatter (sb ).format (
2803+ indent + "if (%1$sInActingVersion())\n " +
2804+ indent + "{\n " +
2805+ indent + " builder << %1$s();\n " +
2806+ indent + "}\n " +
2807+ indent + "else\n " +
2808+ indent + "{\n " +
2809+ indent + " builder << %2$s;\n " +
2810+ indent + "}\n " ,
2811+ fieldName ,
2812+ typeToken .signal () == Signal .BEGIN_SET ? "\" []\" " : "\" {}\" " );
2813+ }
27972814 break ;
27982815 }
27992816
You can’t perform that action at this time.
0 commit comments