Loading libutils/include/utils/Atomic.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef ANDROID_UTILS_ATOMIC_H #define ANDROID_UTILS_ATOMIC_H // DO NOT USE: Please instead use std::atomic #include <cutils/atomic.h> #endif // ANDROID_UTILS_ATOMIC_H libutils/include/utils/BitSet.h +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ /* * Contains some bit manipulation helpers. * * DO NOT USE: std::bitset<32> or std::bitset<64> preferred */ namespace android { Loading libutils/include/utils/Condition.h +2 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ namespace android { // --------------------------------------------------------------------------- // DO NOT USE: please use std::condition_variable instead. /* * Condition variable class. The implementation is system-dependent. * Loading libutils/include/utils/Debug.h +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ template<> struct CompileTimeAssert<true> {}; #define COMPILE_TIME_ASSERT(_exp) \ template class CompileTimeAssert< (_exp) >; #endif // DO NOT USE: Please use static_assert instead #define COMPILE_TIME_ASSERT_FUNCTION_SCOPE(_exp) \ CompileTimeAssert<( _exp )>(); Loading libutils/include/utils/Flattenable.h +2 −2 Original line number Diff line number Diff line Loading @@ -33,13 +33,13 @@ class FlattenableUtils { public: template<size_t N> static size_t align(size_t size) { COMPILE_TIME_ASSERT_FUNCTION_SCOPE( !(N & (N-1)) ); static_assert(!(N & (N - 1)), "Can only align to a power of 2."); return (size + (N-1)) & ~(N-1); } template<size_t N> static size_t align(void const*& buffer) { COMPILE_TIME_ASSERT_FUNCTION_SCOPE( !(N & (N-1)) ); static_assert(!(N & (N - 1)), "Can only align to a power of 2."); uintptr_t b = uintptr_t(buffer); buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); return size_t(uintptr_t(buffer) - b); Loading Loading
libutils/include/utils/Atomic.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef ANDROID_UTILS_ATOMIC_H #define ANDROID_UTILS_ATOMIC_H // DO NOT USE: Please instead use std::atomic #include <cutils/atomic.h> #endif // ANDROID_UTILS_ATOMIC_H
libutils/include/utils/BitSet.h +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ /* * Contains some bit manipulation helpers. * * DO NOT USE: std::bitset<32> or std::bitset<64> preferred */ namespace android { Loading
libutils/include/utils/Condition.h +2 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ namespace android { // --------------------------------------------------------------------------- // DO NOT USE: please use std::condition_variable instead. /* * Condition variable class. The implementation is system-dependent. * Loading
libutils/include/utils/Debug.h +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ template<> struct CompileTimeAssert<true> {}; #define COMPILE_TIME_ASSERT(_exp) \ template class CompileTimeAssert< (_exp) >; #endif // DO NOT USE: Please use static_assert instead #define COMPILE_TIME_ASSERT_FUNCTION_SCOPE(_exp) \ CompileTimeAssert<( _exp )>(); Loading
libutils/include/utils/Flattenable.h +2 −2 Original line number Diff line number Diff line Loading @@ -33,13 +33,13 @@ class FlattenableUtils { public: template<size_t N> static size_t align(size_t size) { COMPILE_TIME_ASSERT_FUNCTION_SCOPE( !(N & (N-1)) ); static_assert(!(N & (N - 1)), "Can only align to a power of 2."); return (size + (N-1)) & ~(N-1); } template<size_t N> static size_t align(void const*& buffer) { COMPILE_TIME_ASSERT_FUNCTION_SCOPE( !(N & (N-1)) ); static_assert(!(N & (N - 1)), "Can only align to a power of 2."); uintptr_t b = uintptr_t(buffer); buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); return size_t(uintptr_t(buffer) - b); Loading