diff options
| author | 2020-08-17 15:53:31 -0700 | |
|---|---|---|
| committer | 2020-08-17 15:53:31 -0700 | |
| commit | 42a9b945d8c0dd058ff3e89a75a0569a9bf1ea96 (patch) | |
| tree | a316e73cb73cf346e32a41dadbd6e0bd36c12307 | |
| parent | 664f2a62f26e92897a0f4c9cfff1f82cd666b60a (diff) | |
Use static_assert directly.
Test: treehugger
Change-Id: Icfb7b7f674ba71640707b26fefc4e406c6c24a2d
| -rw-r--r-- | libs/binder/Parcel.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index c7cb495d15..333b95badc 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -41,7 +41,6 @@ #include <binder/TextOutput.h> #include <cutils/ashmem.h> -#include <utils/Debug.h> #include <utils/Flattenable.h> #include <utils/Log.h> #include <utils/misc.h> @@ -1516,7 +1515,7 @@ const void* Parcel::readInplace(size_t len) const template<class T> status_t Parcel::readAligned(T *pArg) const { - COMPILE_TIME_ASSERT_FUNCTION_SCOPE(PAD_SIZE_UNSAFE(sizeof(T)) == sizeof(T)); + static_assert(PAD_SIZE_UNSAFE(sizeof(T)) == sizeof(T)); if ((mDataPos+sizeof(T)) <= mDataSize) { if (mObjectsSize > 0) { @@ -1549,7 +1548,7 @@ T Parcel::readAligned() const { template<class T> status_t Parcel::writeAligned(T val) { - COMPILE_TIME_ASSERT_FUNCTION_SCOPE(PAD_SIZE_UNSAFE(sizeof(T)) == sizeof(T)); + static_assert(PAD_SIZE_UNSAFE(sizeof(T)) == sizeof(T)); if ((mDataPos+sizeof(val)) <= mDataCapacity) { restart_write: |