@@ -1397,18 +1397,19 @@ private CharSequence generateArrayProperty(
13971397
13981398 if (arrayLength > 1 && arrayLength <= 4 )
13991399 {
1400- sb .append ("\n " )
1401- .append (indent )
1402- .append (" " )
1403- .append (containingClassName )
1404- .append (" &put" ).append (toUpperFirstChar (propertyName ))
1405- .append ("(\n " )
1406- .append (indent ).append (" " )
1407- .append ("const " ).append (cppTypeName ).append (" value0" );
1408-
1409- for (int i = 1 ; i < arrayLength ; i ++)
1400+ sb .append ("\n " ).append (indent ).append (" " )
1401+ .append (containingClassName ).append (" &put" ).append (toUpperFirstChar (propertyName ))
1402+ .append ("(\n " );
1403+
1404+ for (int i = 0 ; i < arrayLength ; i ++)
14101405 {
1411- sb .append (", const " ).append (cppTypeName ).append (" value" ).append (i );
1406+ sb .append (indent ).append (" " )
1407+ .append ("const " ).append (cppTypeName ).append (" value" ).append (i );
1408+
1409+ if (i < (arrayLength - 1 ))
1410+ {
1411+ sb .append (",\n " );
1412+ }
14121413 }
14131414
14141415 sb .append (") SBE_NOEXCEPT\n " );
@@ -1419,7 +1420,7 @@ private CharSequence generateArrayProperty(
14191420 sb .append (generateStoreValue (
14201421 primitiveType ,
14211422 Integer .toString (i ),
1422- String . format ( "%d + (%d * %d)" , offset , i , primitiveType .size ()),
1423+ Integer . toString ( offset + (i * primitiveType .size () )),
14231424 token .encoding ().byteOrder (),
14241425 indent ));
14251426 }
@@ -1823,7 +1824,7 @@ private CharSequence generateMessageFlyweightCode(final String className, final
18231824 " buffer + offset + MessageHeader::encodedLength(),\n " +
18241825 " 0,\n " +
18251826 " bufferLength - MessageHeader::encodedLength(),\n " +
1826- " sbeBlockLength()\n , " +
1827+ " sbeBlockLength(), \n " +
18271828 " sbeSchemaVersion());\n " +
18281829 " }\n \n " +
18291830
0 commit comments