aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-02-26 20:07:44 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-03-02 08:59:14 -0800
commitf5f4be355a65825de06a3c20c76f5b74c1f20837 (patch)
tree3b2dfece44f510192acf116cd2d6717cd8446110
parent7db4ce39e4d2c541c8aea8f172dee974469a98a6 (diff)
downloadpaludis-f5f4be355a65825de06a3c20c76f5b74c1f20837.tar.gz
paludis-f5f4be355a65825de06a3c20c76f5b74c1f20837.tar.xz
explicit cast of enumerations
clang (correctly) flags the non-cast values as being tautological (as they are outside the enumerated values). Explicitly cast the values to the enumeration for the error condition checks.
-rw-r--r--paludis/environments/paludis/output_conf.cc4
-rw-r--r--paludis/repositories/e/e_repository_sets.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc
index ccd5f51..888cb03 100644
--- a/paludis/environments/paludis/output_conf.cc
+++ b/paludis/environments/paludis/output_conf.cc
@@ -173,7 +173,7 @@ namespace
if (rule.action_requirement() != "*" && rule.action_requirement() != "sync")
return false;
- if (-1 != rule.output_exclusivity_requirement() &&
+ if (static_cast<OutputExclusivity>(-1) != rule.output_exclusivity_requirement() &&
rule.output_exclusivity_requirement() != i.output_exclusivity())
return false;
@@ -197,7 +197,7 @@ namespace
if (rule.action_requirement() != "*" && rule.action_requirement() != i.action_name())
return false;
- if (-1 != rule.output_exclusivity_requirement() &&
+ if (static_cast<OutputExclusivity>(-1) != rule.output_exclusivity_requirement() &&
rule.output_exclusivity_requirement() != i.output_exclusivity())
return false;
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 496258b..2f60c1d 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -210,7 +210,7 @@ namespace
if (r.op() == "ge")
our_op = vo_greater_equal;
- if (-1 != our_op)
+ if (static_cast<VersionOperatorValue>(-1) != our_op)
return (VersionOperator(our_op).as_version_spec_comparator()(id->version(), VersionSpec(ver, ver_options)));
if (0 == r.op().compare(0, 1, "r"))