Skip to content

Commit cef3e1f

Browse files
committed
[C++, C#] Tidy up.
Removes superfluous space before SBE_NOEXCEPT specifier in C++. Tightens access modifiers in C#.
1 parent 3d44354 commit cef3e1f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp/CppGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,7 @@ private void generateArrayProperty(
22222222

22232223
new Formatter(sb).format("\n" +
22242224
indent + " #if __cplusplus >= 201703L\n" +
2225-
indent + " SBE_NODISCARD std::string_view get%1$sAsStringView() const %6$s\n" +
2225+
indent + " SBE_NODISCARD std::string_view get%1$sAsStringView() const%6$s\n" +
22262226
indent + " {\n" +
22272227
"%4$s" +
22282228
"%5$s" +

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpGenerator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ private void generateGroupClassHeader(
256256
}
257257

258258
sb.append("\n")
259-
.append(indent).append(INDENT).append("public void NotPresent()\n")
259+
// The "file" access modifier is more suitable but only available from C# 11 onwards.
260+
.append(indent).append(INDENT).append("internal void NotPresent()\n")
260261
.append(indent).append(INDENT).append("{\n")
261262
.append(indent).append(TWO_INDENT).append("_count = 0;\n")
262263
.append(indent).append(TWO_INDENT).append("_index = 0;\n")
@@ -1875,7 +1876,8 @@ private static void generateAccessOrderListenerMethodForVarDataLength(
18751876
}
18761877

18771878
sb.append("\n")
1878-
.append(indent).append("void ").append(accessOrderListenerMethodName(token, "Length")).append("()\n")
1879+
.append(indent).append("private void ")
1880+
.append(accessOrderListenerMethodName(token, "Length")).append("()\n")
18791881
.append(indent).append("{\n");
18801882

18811883
final AccessOrderModel.CodecInteraction accessLength =

0 commit comments

Comments
 (0)