[PPL-devel] [GIT] ppl/ppl(master): Prefer testing explicitly against zero.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Mar 12 13:53:38 CET 2012
Module: ppl/ppl
Branch: master
Commit: 5a2bb64fd41b260b6f68e47053c7a94cb84a65ed
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5a2bb64fd41b260b6f68e47053c7a94cb84a65ed
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Mon Mar 12 11:38:03 2012 +0100
Prefer testing explicitly against zero.
Detected by ECLAIR service utypflag.
---
src/BDS_Status.inlines.hh | 2 +-
src/Og_Status.inlines.hh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/BDS_Status.inlines.hh b/src/BDS_Status.inlines.hh
index 28cbbb3..9ba7aed 100644
--- a/src/BDS_Status.inlines.hh
+++ b/src/BDS_Status.inlines.hh
@@ -47,7 +47,7 @@ BD_Shape<T>::Status::test_all(flags_t mask) const {
template <typename T>
inline bool
BD_Shape<T>::Status::test_any(flags_t mask) const {
- return flags & mask;
+ return (flags & mask) != 0;
}
template <typename T>
diff --git a/src/Og_Status.inlines.hh b/src/Og_Status.inlines.hh
index 2f4f2d6..0fa705f 100644
--- a/src/Og_Status.inlines.hh
+++ b/src/Og_Status.inlines.hh
@@ -47,7 +47,7 @@ Octagonal_Shape<T>::Status::test_all(flags_t mask) const {
template <typename T>
inline bool
Octagonal_Shape<T>::Status::test_any(flags_t mask) const {
- return flags & mask;
+ return (flags & mask) != 0;
}
template <typename T>
More information about the PPL-devel
mailing list