[gnome-calendar] utils: Receive const GdkRGBA*
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] utils: Receive const GdkRGBA*
- Date: Sat, 4 May 2019 15:06:52 +0000 (UTC)
commit 0acf0b60baf90e97c2a50fce7492dc836d7bc894
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 3 19:27:50 2019 -0300
utils: Receive const GdkRGBA*
We do not modify their values, they're const in
practice already.
src/utils/gcal-utils.c | 8 ++++----
src/utils/gcal-utils.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/utils/gcal-utils.c b/src/utils/gcal-utils.c
index 5d2f792a..efcdd58e 100644
--- a/src/utils/gcal-utils.c
+++ b/src/utils/gcal-utils.c
@@ -139,8 +139,8 @@ gcal_get_month_name (gint i)
* Returns: (transfer full): a #cairo_surface_t
*/
cairo_surface_t*
-gcal_get_surface_from_color (GdkRGBA *color,
- gint size)
+gcal_get_surface_from_color (const GdkRGBA *color,
+ gint size)
{
cairo_surface_t *surface;
cairo_t *cr;
@@ -171,8 +171,8 @@ gcal_get_surface_from_color (GdkRGBA *color,
* Returns: (transfer full): a #cairo_surface_t
*/
cairo_surface_t*
-get_circle_surface_from_color (GdkRGBA *color,
- gint size)
+get_circle_surface_from_color (const GdkRGBA *color,
+ gint size)
{
cairo_surface_t *surface;
cairo_t *cr;
diff --git a/src/utils/gcal-utils.h b/src/utils/gcal-utils.h
index 5f8427bf..9dacbb87 100644
--- a/src/utils/gcal-utils.h
+++ b/src/utils/gcal-utils.h
@@ -45,10 +45,10 @@ gchar* gcal_get_weekday (gint
gchar* gcal_get_month_name (gint i);
-cairo_surface_t* gcal_get_surface_from_color (GdkRGBA *color,
+cairo_surface_t* gcal_get_surface_from_color (const GdkRGBA *color,
gint size);
-cairo_surface_t* get_circle_surface_from_color (GdkRGBA *color,
+cairo_surface_t* get_circle_surface_from_color (const GdkRGBA *color,
gint size);
void get_color_name_from_source (ESource *source,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]