Skip to content

Commit 84ffab8

Browse files
committed
cleanup: Replace GNU attributes w/ standardized ones
1 parent d12acf1 commit 84ffab8

File tree

5 files changed

+2
-26
lines changed

5 files changed

+2
-26
lines changed

lib/src/jvmMain/cpp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ add_library(
7878
util/exceptions.cpp
7979
util/exceptions.h
8080
util/instance_manager.h
81-
util/pp_attributes.h
8281
util/pp_cat.h
8382
util/to_bytes.cpp
8483
util/to_bytes.h

lib/src/jvmMain/cpp/tox4j/Tox4j.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
#include "util/to_bytes.h"
1010

1111

12-
#if defined(__GNUC__)
13-
#define NORETURN __attribute__((__noreturn__))
14-
#else
15-
#define NORETURN
16-
#endif
17-
18-
1912
#define JAVA_METHOD_NAME(NAME) \
2013
PP_CAT(Java_im_tox_tox4j_impl_jni_, PP_CAT(CLASS, PP_CAT(Jni_, NAME)))
2114

lib/src/jvmMain/cpp/util/exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <sstream>
55

66

7-
PP_NORETURN void
7+
[[noreturn]] void
88
tox4j_fatal_error (JNIEnv *env, char const *message)
99
{
1010
env->FatalError (message);

lib/src/jvmMain/cpp/util/exceptions.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44

55
#include <string>
66

7-
#include "util/pp_attributes.h"
8-
97

108
void throw_tox_killed_exception (JNIEnv *env, jint instance_number, char const *message);
119
void throw_illegal_state_exception (JNIEnv *env, jint instance_number, char const *message);
1210
void throw_illegal_state_exception (JNIEnv *env, jint instance_number, std::string const &message);
1311
void throw_tox_exception (JNIEnv *env, char const *module, char const *prefix, char const *method, char const *code);
1412

1513

16-
PP_NORETURN void tox4j_fatal_error (JNIEnv *env, char const *message);
14+
[[noreturn]] void tox4j_fatal_error (JNIEnv *env, char const *message);
1715

1816
#define tox4j_fatal(message) tox4j_fatal_error (env, message)
1917

lib/src/jvmMain/cpp/util/pp_attributes.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)