File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ private void generateVarDataDescriptors(
668
668
sizeOfLengthField );
669
669
670
670
new Formatter (sb ).format ("\n " +
671
- indent + " %4$s %1$sLength() const\n " +
671
+ indent + " SBE_NODISCARD %4$s %1$sLength() const\n " +
672
672
indent + " {\n " +
673
673
"%2$s" +
674
674
indent + " %4$s length;\n " +
@@ -1524,7 +1524,7 @@ private void generateArrayProperty(
1524
1524
if (encodingToken .encoding ().primitiveType () == PrimitiveType .CHAR )
1525
1525
{
1526
1526
new Formatter (sb ).format ("\n " +
1527
- indent + " std::string get%1$sAsString() const\n " +
1527
+ indent + " SBE_NODISCARD std::string get%1$sAsString() const\n " +
1528
1528
indent + " {\n " +
1529
1529
indent + " const char *buffer = m_buffer + m_offset + %2$d;\n " +
1530
1530
indent + " size_t length = 0;\n \n " +
@@ -1542,7 +1542,7 @@ private void generateArrayProperty(
1542
1542
1543
1543
new Formatter (sb ).format ("\n " +
1544
1544
indent + " #if __cplusplus >= 201703L\n " +
1545
- indent + " std::string_view get%1$sAsStringView() const SBE_NOEXCEPT\n " +
1545
+ indent + " SBE_NODISCARD std::string_view get%1$sAsStringView() const SBE_NOEXCEPT\n " +
1546
1546
indent + " {\n " +
1547
1547
indent + " const char *buffer = m_buffer + m_offset + %2$d;\n " +
1548
1548
indent + " size_t length = 0;\n \n " +
You can’t perform that action at this time.
0 commit comments