Skip to content

Commit

Permalink
Avoid using vips_object_argument_isset() to check for truthy values
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 17, 2024
1 parent f6aa2bd commit 4c6bfec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libvips/foreign/dzsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ vips_foreign_save_dz_build(VipsObject *object)
* or the deprecated "no_strip" turns this off.
*/
if (!vips_object_argument_isset(object, "keep") &&
!vips_object_argument_isset(object, "no_strip"))
!dz->no_strip)
save->keep = VIPS_FOREIGN_KEEP_NONE;

/* Google, zoomify and iiif default to zero overlap, ".jpg".
Expand Down
2 changes: 1 addition & 1 deletion libvips/foreign/ppmsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ vips_foreign_save_ppm_build(VipsObject *object)

/* Handle the deprecated squash parameter.
*/
if (vips_object_argument_isset(object, "squash"))
if (ppm->squash)
ppm->bitdepth = 1;

if (vips_check_uintorf("vips2ppm", image) ||
Expand Down

0 comments on commit 4c6bfec

Please sign in to comment.