babl-fish: use abstraction for checking if space is cmyk
authorØyvind Kolås <pippin@gimp.org>
Sat, 20 Jul 2019 15:15:29 +0000 (17:15 +0200)
committerØyvind Kolås <pippin@gimp.org>
Sat, 20 Jul 2019 15:15:33 +0000 (17:15 +0200)
babl/babl-fish.c

index a3d299c6e3ff97f0aa722fd6e82b916cce1d05a8..8ce21442f3bbb1c19f0117ab16a431289ecc9798 100644 (file)
@@ -282,10 +282,11 @@ babl_fish (const void *source,
             const Babl *dst_space = (void*)destination_format->format.space;
             /* we haven't tried to search for suitable path yet */
 
-            if (src_space->space.cmyk.is_cmyk == 0 &&
-                dst_space->space.cmyk.is_cmyk == 0)
+            if (!babl_space_is_cmyk (src_space) &&
+                !babl_space_is_cmyk (dst_space))
               {
                 Babl *fish_path = babl_fish_path (source_format, destination_format);
+
                 if (fish_path)
                   {
                     return fish_path;