Skip to content

Commit 5bafb82

Browse files
Algunenanoclaude
andcommitted
Fix bool literals in generated SettingsData constructor
The generator emitted `SettingFieldBool(0)` / `SettingFieldBool(1)` for obsolete settings defined with `MAKE_OBSOLETE(M, Bool, name, 0)`. clang-tidy requires `true`/`false` literals instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba16b3b commit 5bafb82

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Core/gen_settings_data.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ echo "{"
9393
for TYPE in "${TYPE_ORDER[@]}"; do
9494
IDX=0
9595
while IFS=$'\t' read -r NAME DEFAULT; do
96+
## clang-tidy requires bool literals, not 0/1
97+
if [[ "$TYPE" == "Bool" ]]; then
98+
[[ "$DEFAULT" == "0" ]] && DEFAULT="false"
99+
[[ "$DEFAULT" == "1" ]] && DEFAULT="true"
100+
fi
96101
echo " ${TYPE}_[${IDX}] = SettingField${TYPE}(${DEFAULT});"
97102
IDX=$((IDX + 1))
98103
done < "$TMPDIR/$TYPE.txt"

0 commit comments

Comments
 (0)