[gegl] gegl, operations: s/GEGL_DISTANCE_FOO/GEGL_DISTANCE_METRIC_FOO/
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl, operations: s/GEGL_DISTANCE_FOO/GEGL_DISTANCE_METRIC_FOO/
- Date: Sat, 17 Mar 2018 15:19:28 +0000 (UTC)
commit d80704b55d208d349c086caf5c567ccf7622cae0
Author: Jehan <jehan girinstud io>
Date: Sat Mar 17 16:11:27 2018 +0100
gegl, operations: s/GEGL_DISTANCE_FOO/GEGL_DISTANCE_METRIC_FOO/
I have been pointed out that shortened names can make problems in the
future (based on Mitch's bad experience! ;p).
So let's make the enum names more standardized by basing them on the
type full name.
gegl/gegl-enums.c | 6 +++---
gegl/gegl-enums.h | 6 +++---
operations/common/distance-transform.c | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gegl/gegl-enums.c b/gegl/gegl-enums.c
index 00e5da1..1aa2712 100644
--- a/gegl/gegl-enums.c
+++ b/gegl/gegl-enums.c
@@ -120,9 +120,9 @@ gegl_distance_metric_get_type (void)
if (etype == 0)
{
static GEnumValue values[] = {
- { GEGL_DISTANCE_EUCLIDEAN, N_("Euclidean"), "euclidean" },
- { GEGL_DISTANCE_MANHATTAN, N_("Manhattan"), "manhattan" },
- { GEGL_DISTANCE_CHEBYSHEV, N_("Chebyshev"), "chebyshev" },
+ { GEGL_DISTANCE_METRIC_EUCLIDEAN, N_("Euclidean"), "euclidean" },
+ { GEGL_DISTANCE_METRIC_MANHATTAN, N_("Manhattan"), "manhattan" },
+ { GEGL_DISTANCE_METRIC_CHEBYSHEV, N_("Chebyshev"), "chebyshev" },
{ 0, NULL, NULL }
};
diff --git a/gegl/gegl-enums.h b/gegl/gegl-enums.h
index 54b5c2a..4aa73bc 100644
--- a/gegl/gegl-enums.h
+++ b/gegl/gegl-enums.h
@@ -93,9 +93,9 @@ GType gegl_dither_method_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_DITHER_METHOD (gegl_dither_method_get_type ())
typedef enum {
- GEGL_DISTANCE_EUCLIDEAN,
- GEGL_DISTANCE_MANHATTAN,
- GEGL_DISTANCE_CHEBYSHEV
+ GEGL_DISTANCE_METRIC_EUCLIDEAN,
+ GEGL_DISTANCE_METRIC_MANHATTAN,
+ GEGL_DISTANCE_METRIC_CHEBYSHEV
} GeglDistanceMetric;
GType gegl_distance_metric_get_type (void) G_GNUC_CONST;
diff --git a/operations/common/distance-transform.c b/operations/common/distance-transform.c
index 6734cd1..950d74d 100644
--- a/operations/common/distance-transform.c
+++ b/operations/common/distance-transform.c
@@ -28,7 +28,7 @@
#ifdef GEGL_PROPERTIES
property_enum (metric, _("Metric"),
- GeglDistanceMetric, gegl_distance_metric, GEGL_DISTANCE_EUCLIDEAN)
+ GeglDistanceMetric, gegl_distance_metric, GEGL_DISTANCE_METRIC_EUCLIDEAN)
description (_("Metric to use for the distance calculation"))
property_double (threshold_lo, _("Threshold low"), 0.0001)
@@ -158,15 +158,15 @@ binary_dt_2nd_pass (GeglOperation *operation,
switch (metric)
{
- case GEGL_DISTANCE_CHEBYSHEV:
+ case GEGL_DISTANCE_METRIC_CHEBYSHEV:
dt_f = cdt_f;
dt_sep = cdt_sep;
break;
- case GEGL_DISTANCE_MANHATTAN:
+ case GEGL_DISTANCE_METRIC_MANHATTAN:
dt_f = mdt_f;
dt_sep = mdt_sep;
break;
- default: /* GEGL_DISTANCE_EUCLIDEAN */
+ default: /* GEGL_DISTANCE_METRIC_EUCLIDEAN */
dt_f = edt_f;
dt_sep = edt_sep;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]