summaryrefslogtreecommitdiffstats
path: root/runtime/utils.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-11-03 23:41:03 -0800
committerAndreas Gampe <agampe@google.com>2014-11-03 23:41:03 -0800
commit575e78c41ece0dec969d31f46be563d4eb7ae43b (patch)
tree16906df0ba0912a6cb01b3139ba7c60d5f9d09b7 /runtime/utils.h
parent2998e9cdc9f19c30c4944a4726ed9f147de79ebd (diff)
downloadandroid_art-575e78c41ece0dec969d31f46be563d4eb7ae43b.tar.gz
android_art-575e78c41ece0dec969d31f46be563d4eb7ae43b.tar.bz2
android_art-575e78c41ece0dec969d31f46be563d4eb7ae43b.zip
ART: Replace COMPILE_ASSERT with static_assert (runtime)
Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
Diffstat (limited to 'runtime/utils.h')
-rw-r--r--runtime/utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/utils.h b/runtime/utils.h
index 39011e29c7..669fe6cd06 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -84,7 +84,7 @@ static constexpr bool IsPowerOfTwo(T x) {
template<int n, typename T>
static inline bool IsAligned(T x) {
- COMPILE_ASSERT((n & (n - 1)) == 0, n_not_power_of_two);
+ static_assert((n & (n - 1)) == 0, "n is not a power of two");
return (x & (n - 1)) == 0;
}
@@ -222,7 +222,7 @@ static inline bool NeedsEscaping(uint16_t ch) {
// of V >= size of U (compile-time checked).
template<typename U, typename V>
static inline V bit_cast(U in) {
- COMPILE_ASSERT(sizeof(U) <= sizeof(V), size_of_u_not_le_size_of_v);
+ static_assert(sizeof(U) <= sizeof(V), "Size of U not <= size of V");
union {
U u;
V v;