summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2013-09-21 12:40:29 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2013-09-21 12:40:29 +0000
commit0f0b465abde3912c31383ba00b3e81d47fe8fa2a (patch)
tree45f49e77a2b85f5d0bf27ab4a2c4e993802f7f2b /src
parentDrop unused static function declarations (diff)
downloadinkscape-0f0b465abde3912c31383ba00b3e81d47fe8fa2a.tar.gz
inkscape-0f0b465abde3912c31383ba00b3e81d47fe8fa2a.zip
Fix tautological comparison for enum of unspecified type
(bzr r12566)
Diffstat (limited to 'src')
-rw-r--r--src/sp-gradient-spread.h3
-rw-r--r--src/widgets/gradient-toolbar.cpp8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/sp-gradient-spread.h b/src/sp-gradient-spread.h
index cc74ef614..60e33b7c0 100644
--- a/src/sp-gradient-spread.h
+++ b/src/sp-gradient-spread.h
@@ -4,7 +4,8 @@
enum SPGradientSpread {
SP_GRADIENT_SPREAD_PAD,
SP_GRADIENT_SPREAD_REFLECT,
- SP_GRADIENT_SPREAD_REPEAT
+ SP_GRADIENT_SPREAD_REPEAT,
+ SP_GRADIENT_SPREAD_UNDEFINED = INT_MAX
};
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index a68f3f451..f7d2b2bd5 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -286,7 +286,7 @@ void gr_read_selection( Inkscape::Selection *selection,
}
}
if (spread != spr_selected) {
- if (spr_selected != INT_MAX) {
+ if (spr_selected != SP_GRADIENT_SPREAD_UNDEFINED) {
spr_multi = true;
} else {
spr_selected = spread;
@@ -319,7 +319,7 @@ void gr_read_selection( Inkscape::Selection *selection,
}
}
if (spread != spr_selected) {
- if (spr_selected != INT_MAX) {
+ if (spr_selected != SP_GRADIENT_SPREAD_UNDEFINED) {
spr_multi = true;
} else {
spr_selected = spread;
@@ -345,7 +345,7 @@ void gr_read_selection( Inkscape::Selection *selection,
}
}
if (spread != spr_selected) {
- if (spr_selected != INT_MAX) {
+ if (spr_selected != SP_GRADIENT_SPREAD_UNDEFINED) {
spr_multi = true;
} else {
spr_selected = spread;
@@ -380,7 +380,7 @@ static void gr_tb_selection_changed(Inkscape::Selection * /*selection*/, gpointe
}
SPGradient *gr_selected = 0;
- SPGradientSpread spr_selected = static_cast<SPGradientSpread>(INT_MAX); // meaning undefined
+ SPGradientSpread spr_selected = SP_GRADIENT_SPREAD_UNDEFINED;
bool gr_multi = false;
bool spr_multi = false;