Skip to content

Commit

Permalink
Improve documentation of integer range check option
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Jul 17, 2024
1 parent d50e78f commit ba7c66f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compiler/core/src/zserio/tools/CommandLineArguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ private void addOptions()

final OptionGroup rangeCheckCodeGroup = new OptionGroup();
option = new Option(OptionNameWithRangeCheckCode, false,
"enable code for integer range checking for field and parameter setters");
"enable code for integer range checking for fields before serialization");
rangeCheckCodeGroup.addOption(option);
option = new Option(OptionNameWithoutRangeCheckCode, false,
"disable code for integer range checking for field and parameter setters (default)");
"disable code for integer range checking for fields before serialization (default)");
rangeCheckCodeGroup.addOption(option);
rangeCheckCodeGroup.setRequired(false);
options.addOptionGroup(rangeCheckCodeGroup);
Expand Down
6 changes: 4 additions & 2 deletions doc/ZserioUserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ enabled only when writer code is enabled (see `-withWriterCode` option).

**`-withRangeCheckCode|-withoutRangeCheckCode`**

Enables/disables code for range checking for fields and parameters (integer types only). By default is disabled.
Note that range checking can be enabled only when writer code is enabled (see `-withWriterCode` option).
Enables/disables code for integer range checking for fields before serialization which allows identification
of the wrong field. By default is disabled. This option does not influence integer range checking during
serialization which cannot be disabled (but which cannot identify the wrong field). Note that integer range
checking before serialization can be enabled only when writer code is enabled (see `-withWriterCode` option).

**`-withReflectionCode|-withoutReflectionCode`**

Expand Down

0 comments on commit ba7c66f

Please sign in to comment.