summaryrefslogtreecommitdiff
path: root/libartbase/base/utils.h
diff options
context:
space:
mode:
author Stefano Cianciulli <scianciulli@google.com> 2023-05-16 10:32:54 +0000
committer Stefano Cianciulli <scianciulli@google.com> 2023-05-22 10:36:39 +0000
commit78f3c72e8948087352788997a70854dee613352c (patch)
tree306db3c15bc4b7af149bcf3e07be533e50679b88 /libartbase/base/utils.h
parentdc771261232c2ff702373f396a5a7fe586e2f0a6 (diff)
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875 Test: mmm art Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'libartbase/base/utils.h')
-rw-r--r--libartbase/base/utils.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h
index f311f09975..5e04cb0074 100644
--- a/libartbase/base/utils.h
+++ b/libartbase/base/utils.h
@@ -75,16 +75,13 @@ void GetTaskStats(pid_t tid, char* state, int* utime, int* stime, int* task_cpu)
class VoidFunctor {
public:
template <typename A>
- inline void operator() (A a ATTRIBUTE_UNUSED) const {
- }
+ inline void operator()([[maybe_unused]] A a) const {}
template <typename A, typename B>
- inline void operator() (A a ATTRIBUTE_UNUSED, B b ATTRIBUTE_UNUSED) const {
- }
+ inline void operator()([[maybe_unused]] A a, [[maybe_unused]] B b) const {}
template <typename A, typename B, typename C>
- inline void operator() (A a ATTRIBUTE_UNUSED, B b ATTRIBUTE_UNUSED, C c ATTRIBUTE_UNUSED) const {
- }
+ inline void operator()([[maybe_unused]] A a, [[maybe_unused]] B b, [[maybe_unused]] C c) const {}
};
inline bool TestBitmap(size_t idx, const uint8_t* bitmap) {