Skip to content

Commit 24a19de

Browse files
andrewdacenkofacebook-github-bot
authored andcommitted
]
Differential Revision: D78895759
1 parent 801577c commit 24a19de

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

packages/react-native/ReactCommon/cxxreact/TraceSection.h

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828

2929
#endif
3030

31-
#ifndef __unused
32-
#if defined(__GNUC__) || defined(__clang__)
33-
#define __unused __attribute__((unused))
34-
#else
35-
#define __unused
36-
#endif
37-
#endif
38-
3931
namespace facebook::react {
4032

4133
/**
@@ -62,8 +54,8 @@ struct TraceSection {
6254
public:
6355
template <typename... ConvertsToStringPiece>
6456
explicit TraceSection(
65-
const __unused char* name,
66-
__unused ConvertsToStringPiece&&... args) {
57+
[[maybe_unused]] const char* name,
58+
[[maybe_unused]] ConvertsToStringPiece&&... args) {
6759
TRACE_EVENT_BEGIN("react-native", perfetto::DynamicString{name}, args...);
6860
}
6961

@@ -90,8 +82,8 @@ struct DummyTraceSection {
9082
public:
9183
template <typename... ConvertsToStringPiece>
9284
explicit DummyTraceSection(
93-
const __unused char* name,
94-
__unused ConvertsToStringPiece&&... args) {}
85+
[[maybe_unused]] const char* name,
86+
[[maybe_unused]] ConvertsToStringPiece&&... args) {}
9587
};
9688
using TraceSectionUnwrapped = DummyTraceSection;
9789
#endif

0 commit comments

Comments
 (0)