mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
LibGfx/TIFF: Expose default value for numerical tags too
Due to the integer -> bool conversion rule, the condition was wrong. We actually want to test for a not `None` state.
This commit is contained in:
parent
5f5ac48908
commit
a9a5ca6754
Notes:
sideshowbarker
2024-07-17 07:25:39 +09:00
Author: https://github.com/LucasChollet
Commit: a9a5ca6754
Pull-request: https://github.com/SerenityOS/serenity/pull/22785
Reviewed-by: https://github.com/nico ✅
1 changed files with 1 additions and 1 deletions
|
@ -313,7 +313,7 @@ def generate_getter(tag: Tag) -> str:
|
|||
|
||||
signature = fR" Optional<{return_type}> {pascal_case_to_snake_case(tag.name)}() const"
|
||||
|
||||
if tag.default and single_count:
|
||||
if tag.default is not None and single_count:
|
||||
return_if_empty = f'{default_value_to_cpp(tag.default)}'
|
||||
else:
|
||||
return_if_empty = 'OptionalNone {}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue