[gnome-builder] gstyle: fix constness
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gstyle: fix constness
- Date: Sat, 16 Jun 2018 01:46:22 +0000 (UTC)
commit 99d6fd1ada771ee9ebd1d5be80dbebbd3d2cca23
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 15 18:45:44 2018 -0700
gstyle: fix constness
src/gstyle/gstyle-color-panel.c | 23 +++++++++++------------
src/gstyle/gstyle-palette-widget.c | 2 +-
src/gstyle/tests/test-gstyle-palette.c | 2 +-
src/gstyle/tests/test-gstyle-parse.c | 2 +-
4 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/src/gstyle/gstyle-color-panel.c b/src/gstyle/gstyle-color-panel.c
index 4e62a88d4..e4f1486dc 100644
--- a/src/gstyle/gstyle-color-panel.c
+++ b/src/gstyle/gstyle-color-panel.c
@@ -32,18 +32,17 @@
G_DEFINE_TYPE (GstyleColorPanel, gstyle_color_panel, GTK_TYPE_BOX)
-static gchar * comp_names [N_GSTYLE_COLOR_COMPONENT] =
- {
- "hsv_h",
- "hsv_s",
- "hsv_v",
- "lab_l",
- "lab_a",
- "lab_b",
- "rgb_red",
- "rgb_green",
- "rgb_blue"
- };
+static const gchar *comp_names [N_GSTYLE_COLOR_COMPONENT] = {
+ "hsv_h",
+ "hsv_s",
+ "hsv_v",
+ "lab_l",
+ "lab_a",
+ "lab_b",
+ "rgb_red",
+ "rgb_green",
+ "rgb_blue"
+};
/* Conversion between component and color plane mode :
* component without a corresponding mode return
diff --git a/src/gstyle/gstyle-palette-widget.c b/src/gstyle/gstyle-palette-widget.c
index 74c3da88e..df473ee47 100644
--- a/src/gstyle/gstyle-palette-widget.c
+++ b/src/gstyle/gstyle-palette-widget.c
@@ -1592,7 +1592,7 @@ gstyle_palette_widget_init (GstylePaletteWidget *self)
GtkStyleContext *context;
static const GtkTargetEntry dnd_targets [] = {
- {"GSTYLE_COLOR_WIDGET", GTK_TARGET_SAME_APP, 0},
+ { (gchar *)"GSTYLE_COLOR_WIDGET", GTK_TARGET_SAME_APP, 0 },
};
gtk_widget_init_template (GTK_WIDGET (self));
diff --git a/src/gstyle/tests/test-gstyle-palette.c b/src/gstyle/tests/test-gstyle-palette.c
index ff1bf934d..07f316b53 100644
--- a/src/gstyle/tests/test-gstyle-palette.c
+++ b/src/gstyle/tests/test-gstyle-palette.c
@@ -23,7 +23,7 @@
#include "gstyle-palette.h"
static GstylePalette *
-load_palette (gchar *name)
+load_palette (const gchar *name)
{
GstylePalette *palette;
g_autoptr (GFile) file = NULL;
diff --git a/src/gstyle/tests/test-gstyle-parse.c b/src/gstyle/tests/test-gstyle-parse.c
index 54eb31819..7882350e6 100644
--- a/src/gstyle/tests/test-gstyle-parse.c
+++ b/src/gstyle/tests/test-gstyle-parse.c
@@ -26,7 +26,7 @@
typedef struct
{
- gchar *rgb;
+ const gchar *rgb;
gdouble h;
gdouble s;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]