@@ -212,13 +212,15 @@ private static void generateGroupClassHeader(
212
212
formatClassName (groupName )));
213
213
214
214
sb .append (String .format (
215
- indent + " inline void wrapForDecode(char *buffer, std::uint64_t *pos," +
216
- " const std::uint64_t actingVersion, const std::uint64_t bufferLength)\n " +
215
+ indent + " inline void wrapForDecode(\n " +
216
+ indent + " char *buffer,\n " +
217
+ indent + " std::uint64_t *pos,\n " +
218
+ indent + " const std::uint64_t actingVersion,\n " +
219
+ indent + " const std::uint64_t bufferLength)\n " +
217
220
indent + " {\n " +
218
- indent + " %2$s dimensions;\n " +
221
+ indent + " %2$s dimensions(buffer, *pos, bufferLength, actingVersion) ;\n " +
219
222
indent + " m_buffer = buffer;\n " +
220
223
indent + " m_bufferLength = bufferLength;\n " +
221
- indent + " dimensions.wrap(m_buffer, *pos, actingVersion, bufferLength);\n " +
222
224
indent + " m_blockLength = dimensions.blockLength();\n " +
223
225
indent + " m_count = dimensions.numInGroup();\n " +
224
226
indent + " m_index = -1;\n " +
@@ -232,10 +234,13 @@ private static void generateGroupClassHeader(
232
234
final String minCheck = minCount > 0 ? "count < " + minCount + " || " : "" ;
233
235
234
236
sb .append (String .format ("\n " +
235
- indent + " inline void wrapForEncode(char *buffer, const %3$s count," +
236
- " std::uint64_t *pos, const std::uint64_t actingVersion, const std::uint64_t bufferLength)\n " +
237
+ indent + " inline void wrapForEncode(\n " +
238
+ indent + " char *buffer,\n " +
239
+ indent + " const %3$s count,\n " +
240
+ indent + " std::uint64_t *pos,\n " +
241
+ indent + " const std::uint64_t actingVersion,\n " +
242
+ indent + " const std::uint64_t bufferLength)\n " +
237
243
indent + " {\n " +
238
- indent + " %7$s dimensions;\n " +
239
244
indent + "#if defined(__GNUG__) && !defined(__clang__)\n " +
240
245
indent + "#pragma GCC diagnostic push\n " +
241
246
indent + "#pragma GCC diagnostic ignored \" -Wtype-limits\" \n " +
@@ -249,7 +254,7 @@ private static void generateGroupClassHeader(
249
254
indent + "#endif\n " +
250
255
indent + " m_buffer = buffer;\n " +
251
256
indent + " m_bufferLength = bufferLength;\n " +
252
- indent + " dimensions.wrap(m_buffer , *pos, actingVersion, bufferLength );\n " +
257
+ indent + " %7$s dimensions(buffer , *pos, bufferLength, actingVersion );\n " +
253
258
indent + " dimensions.blockLength((%1$s)%2$d);\n " +
254
259
indent + " dimensions.numInGroup((%3$s)count);\n " +
255
260
indent + " m_index = -1;\n " +
0 commit comments