summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marcjeanmougin@free.fr>2017-10-31 01:42:22 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2017-10-31 01:42:22 +0000
commitbdf23d1d42a1664e5804ab3c29700706d1e29979 (patch)
tree22d06b423f26d3b7dccd6d56e23e56b92afa9081 /src
parentFix a bug converting to paths nested LPE with powerstroke (diff)
downloadinkscape-bdf23d1d42a1664e5804ab3c29700706d1e29979.tar.gz
inkscape-bdf23d1d42a1664e5804ab3c29700706d1e29979.zip
fix asserts
Diffstat (limited to 'src')
-rw-r--r--src/svg/svg-color.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index 89a5636a8..60cbff3dc 100644
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
@@ -398,7 +398,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
* this check wrapper. */
gchar const *end = str;
guint32 const ret = internal_sp_svg_read_color(str, &end, dfl);
- assert(((ret == dfl) && (end == str))
+ g_assert(((ret == dfl) && (end == str))
|| (((ret & 0xff) == 0)
&& (str < end)));
if (str < end) {
@@ -407,7 +407,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
buf[end - str] = '\0';
gchar const *buf_end = buf;
guint32 const check = internal_sp_svg_read_color(buf, &buf_end, 1);
- assert(check == ret
+ g_assert(check == ret
&& buf_end - buf == end - str);
g_free(buf);
@@ -425,7 +425,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl)
*/
static void rgb24_to_css(char *const buf, unsigned const rgb24)
{
- assert(rgb24 < (1u << 24));
+ g_assert(rgb24 < (1u << 24));
/* SVG 1.1 Full allows additional colour names not supported by SVG Tiny, but we don't bother
* with them: it's good for these colours to be copyable to non-SVG CSS stylesheets and for