summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab7990b)
raw | patch | inline | side by side (parent: ab7990b)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 02:30:03 +0000 (02:30 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 02:30:03 +0000 (02:30 +0000) |
src/svg/svg-color.cpp | patch | blob | history |
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index 0dc84fb08b1086e173d6dab48fab17e4312e2ad8..a8a157ba2dfd81774cdf7179310f9fd8538649dc 100644 (file)
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
/*
* These are the colors defined in the SVG standard
*/
-static SPSVGColor sp_svg_color_named[] = {
+static SPSVGColor const sp_svg_color_named[] = {
{ 0xF0F8FF, "aliceblue" },
{ 0xFAEBD7, "antiquewhite" },
{ 0x00FFFF, "aqua" },
#define SP_SVG_NUMCOLORS (sizeof (sp_svg_color_named) / sizeof (sp_svg_color_named[0]))
-static GHashTable *sp_svg_create_color_hash (void);
+static GHashTable *sp_svg_create_color_hash();
guint32
-sp_svg_read_color (const gchar *str, guint32 def)
+sp_svg_read_color (gchar const *str, guint32 def)
{
static GHashTable *colors = NULL;
gchar c[32];
}
static GHashTable *
-sp_svg_create_color_hash (void)
+sp_svg_create_color_hash()
{
GHashTable * colors = g_hash_table_new (g_str_hash, g_str_equal);
for (unsigned i = 0 ; i < SP_SVG_NUMCOLORS ; i++) {
- void const *name = sp_svg_color_named[i].name;
- gpointer val = &(sp_svg_color_named[i].rgb);
- g_hash_table_insert(colors, const_cast<gpointer>(name), val);
+ g_hash_table_insert(colors,
+ (gpointer)(sp_svg_color_named[i].name),
+ (gpointer)(&sp_svg_color_named[i].rgb));
}
return colors;