summaryrefslogtreecommitdiffhomepage
path: root/compat/macros.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-04-03 12:26:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-04-05 03:23:13 +0200
commiteb32a2ac02c6d1adcfeb0a1a5522f8aaea442489 (patch)
treeb15b4ab34600e9c5d5da17eac33ea687167bbfc7 /compat/macros.hpp
parent22a853b388597e9549125df69508c1c38706dd1d (diff)
i18n: provide for non-QObject classes
See compat/tr.hpp for comment.
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r--compat/macros.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index c8fbca20..b0c7a51d 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -1,16 +1,9 @@
#pragma once
-#if !defined __WINE__
-# include <QCoreApplication>
-# define otr_tr(...) (QCoreApplication::translate(OTR_MODULE_NAME, __VA_ARGS__))
-# define _(...) (otr_tr(__VA_ARGS__))
-#endif
-
#if defined _MSC_VER
-#
-# define MEMORY_BARRIER _ReadWriteBarrier()
+# define MEMORY_BARRIER() _ReadWriteBarrier()
#else
-# define MEMORY_BARRIER asm volatile("" ::: "memory")
+# define MEMORY_BARRIER() asm volatile("" ::: "memory")
#endif
#if defined _MSC_VER
@@ -52,3 +45,7 @@
#else
# define OTR_FUNNAME (__PRETTY_FUNCTION__)
#endif
+
+#if defined __cplusplus
+# define thunk(...) ([&]() { __VA_ARGS__; })
+#endif