summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2020-09-17 08:54:56 +0200
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2020-09-17 09:04:38 +0200
commit701b03cf0634a76ba182dbf7a67ae141431ab9a5 (patch)
treeb47e737ef84121d5a49e1f56e845d8a3983239f0
parent99116181449771f3a86c634c45760a9d26e869c1 (diff)
downloadgjs-701b03cf0634a76ba182dbf7a67ae141431ab9a5.tar.gz
fix build with clang
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r--gjs/jsapi-class.h4
-rw-r--r--gjs/jsapi-util-args.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/gjs/jsapi-class.h b/gjs/jsapi-class.h
index dfdde4e8..0bd502a1 100644
--- a/gjs/jsapi-class.h
+++ b/gjs/jsapi-class.h
@@ -77,11 +77,11 @@ bool gjs_define_property_dynamic(JSContext *cx,
* do_base_typecheck and priv_from_js
*/
#define GJS_DEFINE_PRIV_FROM_JS(type, klass) \
- GJS_ALWAYS_INLINE [[nodiscard]] [[maybe_unused]] static inline bool \
+ [[nodiscard]] [[maybe_unused]] GJS_ALWAYS_INLINE static inline bool \
do_base_typecheck(JSContext* cx, JS::HandleObject obj, bool throw_error) { \
return gjs_typecheck_instance(cx, obj, &klass, throw_error); \
} \
- GJS_ALWAYS_INLINE [[nodiscard]] static inline type* priv_from_js( \
+ [[nodiscard]] GJS_ALWAYS_INLINE static inline type* priv_from_js( \
JSContext* cx, JS::HandleObject obj) { \
return static_cast<type*>( \
JS_GetInstancePrivate(cx, obj, &klass, nullptr)); \
diff --git a/gjs/jsapi-util-args.h b/gjs/jsapi-util-args.h
index 9e49df7d..b240f8dc 100644
--- a/gjs/jsapi-util-args.h
+++ b/gjs/jsapi-util-args.h
@@ -43,7 +43,7 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-GJS_ALWAYS_INLINE [[nodiscard]] static inline bool check_nullable(
+[[nodiscard]] GJS_ALWAYS_INLINE static inline bool check_nullable(
const char*& fchar, const char*& fmt_string) {
if (*fchar != '?')
return false;