Skip to content

Commit d7e3e00

Browse files
committed
[C++] mark a generated function SBE_CONSTEXPR (#1055)
1 parent cb4eb1f commit d7e3e00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,9 +2630,9 @@ private void generateConstPropertyMethods(
26302630
values);
26312631

26322632
sb.append(String.format("\n" +
2633-
indent + " SBE_NODISCARD %1$s %2$s(const std::uint64_t index) const\n" +
2633+
indent + " SBE_NODISCARD static SBE_CONSTEXPR %1$s %2$s(const std::uint64_t index)\n" +
26342634
indent + " {\n" +
2635-
indent + " static const std::uint8_t %2$sValues[] = { %3$s, 0 };\n\n" +
2635+
indent + " const std::uint8_t %2$sValues[] = { %3$s, 0 };\n\n" +
26362636

26372637
indent + " return (char)%2$sValues[index];\n" +
26382638
indent + " }\n",

0 commit comments

Comments
 (0)