From: Christophe CURIS <[email protected]>
Now that the function handling the configuration dictionnary are
const correct, the key stored in static array can be given the const
attribute.
---
WPrefs.app/Expert.c | 2 +-
WPrefs.app/KeyboardShortcuts.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index d82bc6f..7cb85f3 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -34,7 +34,7 @@ static const struct {
OPTION_USERDEF
} class;
- char *op_name; /* The identifier for the option in the config file */
+ const char *op_name; /* The identifier for the option in the config
file */
} expert_options[] = {
diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c
index d5b2ce1..ef48656 100644
--- a/WPrefs.app/KeyboardShortcuts.c
+++ b/WPrefs.app/KeyboardShortcuts.c
@@ -66,11 +66,11 @@ typedef struct _Panel {
* Second is the text displayed to the user
*/
static const struct {
+ const char *key;
/*
- * Fixme: these strings should be 'const', but 'GetStringForKey'
- * and 'WMAddListItem' do not allow us to do so
+ * Fixme: this string should be 'const', but 'WMAddListItem'
+ * do not allow us to do so
*/
- char *key;
char *title;
} keyOptions[] = {
{ "RootMenuKey", N_("Open applications menu") },
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].