From fe6a2adbd706725d152bfb2c4e8a9c56dc1d3965 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 15 Dec 2016 21:48:00 +0100 Subject: libcolour_rgb_colour_space: first parameter is of type libcolour_rgb_t* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcolour.c | 8 +++----- src/libcolour.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/libcolour.c b/src/libcolour.c index 7799534..b6c6e5b 100644 --- a/src/libcolour.c +++ b/src/libcolour.c @@ -1082,12 +1082,10 @@ static void get_transfer_function(libcolour_colour_t* cs) } -int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour_space_t space) +int libcolour_rgb_colour_space(libcolour_rgb_t* cs, libcolour_rgb_colour_space_t space) { #define XYY(XVALUE, YVALUE) (libcolour_ciexyy_t){ .model = LIBCOLOUR_CIEXYY, .x = XVALUE, .y = YVALUE, .Y = 1} - libcolour_rgb_t* cs = &cs_->rgb; - switch (space) { case LIBCOLOUR_RGB_COLOUR_SPACE_CUSTOM_FROM_MEASUREMENTS: if (get_matrices(cs)) @@ -1375,9 +1373,9 @@ int libcolour_get_rgb_colour_space(libcolour_colour_t* cs_, libcolour_rgb_colour cs->transitioninv = cs->transition * cs->slope; cs->colour_space = space; cs->white_r = cs->white_g = cs->white_b = 1; - if (get_matrices(cs) || libcolour_proper(cs_)) + if (get_matrices(cs) || libcolour_proper((libcolour_colour_t*)cs)) return -1; - get_transfer_function(cs_); + get_transfer_function((libcolour_colour_t*)cs); return 0; #undef XYY diff --git a/src/libcolour.h b/src/libcolour.h index 3a8975e..b45b1a4 100644 --- a/src/libcolour.h +++ b/src/libcolour.h @@ -291,7 +291,7 @@ double libcolour_srgb_encode(double); double libcolour_srgb_decode(double); int libcolour_delta_e(const libcolour_colour_t*, const libcolour_colour_t*, double*); int libcolour_proper(libcolour_colour_t*); -int libcolour_get_rgb_colour_space(libcolour_colour_t*, libcolour_rgb_colour_space_t); +int libcolour_get_rgb_colour_space(libcolour_rgb_t*, libcolour_rgb_colour_space_t); size_t libcolour_marshal(const libcolour_colour_t*, void*); size_t libcolour_unmarshal(libcolour_colour_t*, const void*); -- cgit v1.2.3-70-g09d2