From 928c6bdc79970da2ed340b8942fae77432c42583 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Sun, 26 Aug 2012 11:21:41 +0200 Subject: [PATCH] remove hkl_axis_get/set_changed --- hkl/Hkl-5.0.gir | 15 --------------- hkl/hkl-axis.c | 10 ---------- hkl/hkl-axis.h | 4 ---- hkl/hkl-geometry.c | 4 ++-- test/hkl/geometry-t.c | 4 ++-- 5 files changed, 4 insertions(+), 33 deletions(-) diff --git a/hkl/Hkl-5.0.gir b/hkl/Hkl-5.0.gir index a77bfaef..f414feed 100644 --- a/hkl/Hkl-5.0.gir +++ b/hkl/Hkl-5.0.gir @@ -48,11 +48,6 @@ and/or use gtk-doc annotations. --> - - - - - @@ -137,16 +132,6 @@ and/or use gtk-doc annotations. --> - - - - - - - - - - diff --git a/hkl/hkl-axis.c b/hkl/hkl-axis.c index 4ece616f..7ce15043 100644 --- a/hkl/hkl-axis.c +++ b/hkl/hkl-axis.c @@ -139,16 +139,6 @@ void hkl_axis_init(HklAxis *self, const char* name, const HklVector *axis_v) self->axis_v = *axis_v; } -int hkl_axis_get_changed(HklAxis const *self) -{ - return self->parameter.changed; -} - -void hkl_axis_set_changed(HklAxis *self, int changed) -{ - self->parameter.changed = changed; -} - double hkl_axis_get_value_closest(HklAxis const *self, HklAxis const *axis) { double angle = hkl_parameter_get_value(&self->parameter); diff --git a/hkl/hkl-axis.h b/hkl/hkl-axis.h index 09bc9922..9e95f5f0 100644 --- a/hkl/hkl-axis.h +++ b/hkl/hkl-axis.h @@ -52,10 +52,6 @@ extern void hkl_axis_free(HklAxis *self); extern void hkl_axis_init(HklAxis *axis, char const * name, HklVector const *axis_v); -extern int hkl_axis_get_changed(HklAxis const *self); - -extern void hkl_axis_set_changed(HklAxis *self, int changed); - extern double hkl_axis_get_value_closest(HklAxis const *self, HklAxis const *axis); extern double hkl_axis_get_value_closest_unit(HklAxis const *self, HklAxis const *axis); diff --git a/hkl/hkl-geometry.c b/hkl/hkl-geometry.c index 081809bd..68843e49 100644 --- a/hkl/hkl-geometry.c +++ b/hkl/hkl-geometry.c @@ -314,7 +314,7 @@ void hkl_geometry_update(HklGeometry *self) int ko = 0; for(i=0; ilen; ++i) - if (hkl_axis_get_changed(&self->axes[i])) { + if (self->axes[i].parameter.changed) { ko = 1; break; } @@ -324,7 +324,7 @@ void hkl_geometry_update(HklGeometry *self) hkl_holder_update(&self->holders[i]); for(i=0; ilen; i++) - hkl_axis_set_changed(&self->axes[i], HKL_FALSE); + self->axes[i].parameter.changed = HKL_FALSE; } } diff --git a/test/hkl/geometry-t.c b/test/hkl/geometry-t.c index 109a8bc0..21e8939f 100644 --- a/test/hkl/geometry-t.c +++ b/test/hkl/geometry-t.c @@ -88,7 +88,7 @@ static void update(void) axis1 = hkl_geometry_get_axis_by_name(g, "B"); hkl_axis_set_value(axis1, M_PI_2); /* now axis1 is dirty */ - ok(HKL_TRUE == hkl_axis_get_changed(axis1), __func__); + ok(HKL_TRUE == axis1->parameter.changed, __func__); hkl_geometry_update(g); is_double(1./sqrt(2), g->holders[0].q.data[0], HKL_EPSILON, __func__); @@ -96,7 +96,7 @@ static void update(void) is_double(.0, g->holders[0].q.data[2], HKL_EPSILON, __func__); is_double(.0, g->holders[0].q.data[3], HKL_EPSILON, __func__); /* now axis1 is clean */ - ok(HKL_FALSE == hkl_axis_get_changed(axis1), __func__); + ok(HKL_FALSE == axis1->parameter.changed, __func__); hkl_geometry_free(g); } -- 2.11.4.GIT