Skip to content

Commit 0d1473a

Browse files
committed
fixup: fix compile error with multiple inlines
1 parent 4ff479c commit 0d1473a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

core/include/measurement.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define ALWAYS_INLINE __forceinline
99
#else
1010
#include <unistd.h>
11-
#define ALWAYS_INLINE __attribute__((always_inline))
11+
#define ALWAYS_INLINE __attribute__((always_inline)) inline
1212
#endif
1313

1414
extern "C" {
@@ -36,16 +36,15 @@ inline void measurement_set_metadata() {
3636
instrument_hooks_set_integration(g_hooks, "codspeed-cpp", version.c_str());
3737
}
3838

39-
ALWAYS_INLINE inline void measurement_start() {
39+
ALWAYS_INLINE void measurement_start() {
4040
instrument_hooks_start_benchmark_inline(g_hooks);
4141
}
4242

43-
ALWAYS_INLINE inline void measurement_stop() {
43+
ALWAYS_INLINE void measurement_stop() {
4444
instrument_hooks_stop_benchmark_inline(g_hooks);
4545
}
4646

47-
ALWAYS_INLINE inline void measurement_set_executed_benchmark(
48-
const std::string& name) {
47+
ALWAYS_INLINE void measurement_set_executed_benchmark(const std::string& name) {
4948
auto current_pid = getpid();
5049
instrument_hooks_executed_benchmark(g_hooks, current_pid, name.c_str());
5150
}

0 commit comments

Comments
 (0)