Author: abrander
Date: 2009-10-15 17:04:14 +0200 (Thu, 15 Oct 2009)
New Revision: 2718
Modified:
trunk/librawstudio/rs-1d-function.c
trunk/librawstudio/rs-1d-function.h
Log:
Added a few missing const.
Modified: trunk/librawstudio/rs-1d-function.c
===================================================================
--- trunk/librawstudio/rs-1d-function.c 2009-10-15 14:51:02 UTC (rev 2717)
+++ trunk/librawstudio/rs-1d-function.c 2009-10-15 15:04:14 UTC (rev 2718)
@@ -45,7 +45,7 @@
* Behaves like #rs_1d_function_new but returns a singleton
* @return A new RS1dFunction singleton which should not be unreffed
*/
-RS1dFunction *
+const RS1dFunction *
rs_1d_function_new_singleton(void)
{
static GStaticMutex lock = G_STATIC_MUTEX_INIT;
@@ -66,7 +66,7 @@
* @return Mapped value for x
*/
gdouble
-rs_1d_function_evaluate(RS1dFunction *func, gdouble x)
+rs_1d_function_evaluate(const RS1dFunction *func, const gdouble x)
{
g_assert(RS_IS_1D_FUNCTION(func));
@@ -85,7 +85,7 @@
* @return Inverse value for y
*/
gdouble
-rs_1d_function_evaluate_inverse(RS1dFunction *func, gdouble y)
+rs_1d_function_evaluate_inverse(const RS1dFunction *func, const gdouble y)
{
g_assert(RS_IS_1D_FUNCTION(func));
@@ -103,7 +103,7 @@
* @return TRUE if rs_1d_function_evaluate(#func, x) == x for all x, FALSE
otherwise
*/
gboolean
-rs_1d_function_is_identity(RS1dFunction *func)
+rs_1d_function_is_identity(const RS1dFunction *func)
{
g_assert(RS_IS_1D_FUNCTION(func));
Modified: trunk/librawstudio/rs-1d-function.h
===================================================================
--- trunk/librawstudio/rs-1d-function.h 2009-10-15 14:51:02 UTC (rev 2717)
+++ trunk/librawstudio/rs-1d-function.h 2009-10-15 15:04:14 UTC (rev 2718)
@@ -35,8 +35,8 @@
GObject parent;
} RS1dFunction;
-typedef gdouble (RS1dFunctionEvaluate)(RS1dFunction *func, gdouble x);
-typedef gboolean (RS1dFunctionIsIdentity)(RS1dFunction *func);
+typedef gdouble (RS1dFunctionEvaluate)(const RS1dFunction *func, const
gdouble);
+typedef gboolean (RS1dFunctionIsIdentity)(const RS1dFunction *func);
typedef struct {
GObjectClass parent_class;
@@ -59,7 +59,7 @@
* Behaves like #rs_1d_function_new but returns a singleton
* @return A new RS1dFunction singleton which should not be unreffed
*/
-RS1dFunction *
+const RS1dFunction *
rs_1d_function_new_singleton(void);
/**
@@ -69,7 +69,7 @@
* @return Mapped value for x
*/
gdouble
-rs_1d_function_evaluate(RS1dFunction *func, gdouble x);
+rs_1d_function_evaluate(const RS1dFunction *func, gdouble x);
/**
* Map y to a new x value
@@ -78,7 +78,7 @@
* @return Inverse value for y
*/
gdouble
-rs_1d_function_evaluate_inverse(RS1dFunction *func, gdouble y);
+rs_1d_function_evaluate_inverse(const RS1dFunction *func, gdouble y);
/**
* Return TRUE if rs_1d_function_evaluate(#func, x) == x for all x
@@ -86,7 +86,7 @@
* @return TRUE if rs_1d_function_evaluate(#func, x) == x for all x, FALSE
otherwise
*/
gboolean
-rs_1d_function_is_identity(RS1dFunction *func);
+rs_1d_function_is_identity(const RS1dFunction *func);
G_END_DECLS
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit