[gimp] app: remove "default:" from the switch in gimp_layer_mode_get_operation()



commit 1924212dcf0d97866a9785d77f1060fdb971a220
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jan 31 22:48:03 2017 +0100

    app: remove "default:" from the switch in gimp_layer_mode_get_operation()
    
    and list all modes explicitly; preparation for moving all of this info
    to some table of structs.

 app/core/gimp-layer-modes.c |   56 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 52 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimp-layer-modes.c b/app/core/gimp-layer-modes.c
index c3e6433..8655905 100644
--- a/app/core/gimp-layer-modes.c
+++ b/app/core/gimp-layer-modes.c
@@ -774,6 +774,58 @@ gimp_layer_mode_get_operation (GimpLayerMode  mode)
     case GIMP_LAYER_MODE_BEHIND_LINEAR:
       return "gimp:behind";
 
+    case GIMP_LAYER_MODE_OVERLAY:
+    case GIMP_LAYER_MODE_OVERLAY_LINEAR:
+    case GIMP_LAYER_MODE_LCH_HUE:
+    case GIMP_LAYER_MODE_LCH_CHROMA:
+    case GIMP_LAYER_MODE_LCH_COLOR:
+    case GIMP_LAYER_MODE_LCH_LIGHTNESS:
+    case GIMP_LAYER_MODE_MULTIPLY:
+    case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
+    case GIMP_LAYER_MODE_SCREEN:
+    case GIMP_LAYER_MODE_SCREEN_LINEAR:
+    case GIMP_LAYER_MODE_DIFFERENCE:
+    case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
+    case GIMP_LAYER_MODE_ADDITION:
+    case GIMP_LAYER_MODE_ADDITION_LINEAR:
+    case GIMP_LAYER_MODE_SUBTRACT:
+    case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
+    case GIMP_LAYER_MODE_DARKEN_ONLY:
+    case GIMP_LAYER_MODE_LIGHTEN_ONLY:
+    case GIMP_LAYER_MODE_HSV_HUE:
+    case GIMP_LAYER_MODE_HSV_SATURATION:
+    case GIMP_LAYER_MODE_HSV_COLOR:
+    case GIMP_LAYER_MODE_HSV_VALUE:
+    case GIMP_LAYER_MODE_DIVIDE:
+    case GIMP_LAYER_MODE_DIVIDE_LINEAR:
+    case GIMP_LAYER_MODE_DODGE:
+    case GIMP_LAYER_MODE_DODGE_LINEAR:
+    case GIMP_LAYER_MODE_BURN:
+    case GIMP_LAYER_MODE_BURN_LINEAR:
+    case GIMP_LAYER_MODE_HARDLIGHT:
+    case GIMP_LAYER_MODE_HARDLIGHT_LINEAR:
+    case GIMP_LAYER_MODE_SOFTLIGHT:
+    case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
+    case GIMP_LAYER_MODE_GRAIN_EXTRACT:
+    case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
+    case GIMP_LAYER_MODE_GRAIN_MERGE:
+    case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
+    case GIMP_LAYER_MODE_VIVID_LIGHT:
+    case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
+    case GIMP_LAYER_MODE_PIN_LIGHT:
+    case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
+    case GIMP_LAYER_MODE_LINEAR_LIGHT:
+    case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
+    case GIMP_LAYER_MODE_EXCLUSION:
+    case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
+    case GIMP_LAYER_MODE_LINEAR_BURN:
+    case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
+    case GIMP_LAYER_MODE_LUMA_DARKEN_ONLY:
+    case GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY:
+    case GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY:
+    case GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY:
+      return "gimp:layer-mode";
+
     case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
       return "gimp:multiply-legacy";
 
@@ -781,7 +833,6 @@ gimp_layer_mode_get_operation (GimpLayerMode  mode)
       return "gimp:screen-legacy";
 
     case GIMP_LAYER_MODE_OVERLAY_LEGACY:
-
       return "gimp:softlight-legacy";
 
     case GIMP_LAYER_MODE_DIFFERENCE_LEGACY:
@@ -843,9 +894,6 @@ gimp_layer_mode_get_operation (GimpLayerMode  mode)
 
     case GIMP_LAYER_MODE_ANTI_ERASE:
       return "gimp:anti-erase";
-
-    default:
-      return "gimp:layer-mode";
     }
 
   return "gimp:layer-mode";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]