summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2025-01-29 16:34:21 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2025-01-30 08:03:37 -0800
commitf10036f351515b670e9480aebef009f35ced8bb6 (patch)
tree50b335729c32b9a66fad838a67a1fc0de3956f80 /compiler
parentfc034369e32af6ea92e82a04b3cfa99c5ca46fd4 (diff)
Avoid implicit conversion to bool in SideEffect's methods
Test: art/test/testrunner/testrunner.py --host --64 -b --optimizing Change-Id: I375edc2db3979e7080c0b9fe784fd2b5e2cfb4e4
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/nodes.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index bfca739bc1..86a62c1994 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1733,26 +1733,26 @@ class SideEffects : public ValueObject {
}
bool HasSideEffects() const {
- return (flags_ & kAllChangeBits);
+ return (flags_ & kAllChangeBits) != 0u;
}
bool HasDependencies() const {
- return (flags_ & kAllDependOnBits);
+ return (flags_ & kAllDependOnBits) != 0u;
}
// Returns true if there are no side effects or dependencies.
bool DoesNothing() const {
- return flags_ == 0;
+ return flags_ == 0u;
}
// Returns true if something is written.
bool DoesAnyWrite() const {
- return (flags_ & kAllWrites);
+ return (flags_ & kAllWrites) != 0u;
}
// Returns true if something is read.
bool DoesAnyRead() const {
- return (flags_ & kAllReads);
+ return (flags_ & kAllReads) != 0u;
}
// Returns true if potentially everything is written and read
@@ -1768,7 +1768,7 @@ class SideEffects : public ValueObject {
// Returns true if `this` may read something written by `other`.
bool MayDependOn(SideEffects other) const {
const uint64_t depends_on_flags = (flags_ & kAllDependOnBits) >> kChangeBits;
- return (other.flags_ & depends_on_flags);
+ return (other.flags_ & depends_on_flags) != 0u;
}
// Returns string representation of flags (for debugging only).