summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-22 13:21:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:01:53 +0200
commit519b4a3ae10c96951db917f2439982c7d2391874 (patch)
treeec55d8a12fa740803e6da2074eec04f465e98ede
parent0f182b791622ad4491c8aabf8edce21a63839bdc (diff)
compat/macros: rename portability macros
use `cc_xx' rather than awkward synonyms.
-rw-r--r--compat/base-path.cpp2
-rw-r--r--compat/base-path.hpp2
-rw-r--r--compat/check-visible.cpp8
-rw-r--r--compat/check-visible.hpp4
-rw-r--r--compat/macros.hpp42
-rw-r--r--compat/math.hpp2
-rw-r--r--compat/run-in-thread.hpp2
-rw-r--r--compat/shm.h10
-rw-r--r--compat/warn.hpp6
-rw-r--r--filter-accela/ftnoir_filter_accela.cpp2
-rw-r--r--logic/pipeline.cpp10
-rw-r--r--logic/pipeline.hpp6
-rw-r--r--options/bundle.hpp10
-rw-r--r--options/group.cpp4
-rw-r--r--options/group.hpp8
-rw-r--r--options/slider.hpp2
-rw-r--r--options/value.hpp22
-rw-r--r--pose-widget/pose-widget.cpp8
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp6
-rw-r--r--qxt-mini/powerset.hpp4
-rw-r--r--spline/spline.cpp2
-rw-r--r--spline/spline.hpp4
-rw-r--r--tracker-pt/module/camera.h2
-rw-r--r--tracker-pt/module/point_extractor.cpp8
-rw-r--r--tracker-pt/pt-api.hpp6
-rw-r--r--tracker-steamvr/steamvr.hpp2
26 files changed, 91 insertions, 93 deletions
diff --git a/compat/base-path.cpp b/compat/base-path.cpp
index 3285bac8..f207eca0 100644
--- a/compat/base-path.cpp
+++ b/compat/base-path.cpp
@@ -2,7 +2,7 @@
#include <QCoreApplication>
OTR_COMPAT_EXPORT
-never_inline
+cc_noinline
const QString& application_base_path()
{
static QString const& const_path = QCoreApplication::applicationDirPath();
diff --git a/compat/base-path.hpp b/compat/base-path.hpp
index 8e2884fd..06e2c703 100644
--- a/compat/base-path.hpp
+++ b/compat/base-path.hpp
@@ -6,7 +6,7 @@
#include <QString>
OTR_COMPAT_EXPORT
-never_inline
+cc_noinline
const QString& application_base_path();
#define OPENTRACK_BASE_PATH (application_base_path())
diff --git a/compat/check-visible.cpp b/compat/check-visible.cpp
index 84ddd6d9..0f4c6e6d 100644
--- a/compat/check-visible.cpp
+++ b/compat/check-visible.cpp
@@ -15,7 +15,7 @@ static Timer timer;
static QMutex mtx;
static bool visible = true;
-never_inline OTR_COMPAT_EXPORT
+cc_noinline OTR_COMPAT_EXPORT
void set_is_visible(const QWidget& w, bool force)
{
QMutexLocker l(&mtx);
@@ -47,7 +47,7 @@ void set_is_visible(const QWidget& w, bool force)
}
}
-never_inline OTR_COMPAT_EXPORT
+cc_noinline OTR_COMPAT_EXPORT
bool check_is_visible()
{
QMutexLocker l(&mtx);
@@ -57,12 +57,12 @@ bool check_is_visible()
#else
-never_inline OTR_COMPAT_EXPORT
+cc_noinline OTR_COMPAT_EXPORT
void set_is_visible(const QWidget&, bool)
{
}
-never_inline OTR_COMPAT_EXPORT
+cc_noinline OTR_COMPAT_EXPORT
bool check_is_visible()
{
return true;
diff --git a/compat/check-visible.hpp b/compat/check-visible.hpp
index a0211982..65a20d79 100644
--- a/compat/check-visible.hpp
+++ b/compat/check-visible.hpp
@@ -5,5 +5,5 @@
#include <QWidget>
-never_inline OTR_COMPAT_EXPORT void set_is_visible(QWidget const& w, bool force = false);
-never_inline OTR_COMPAT_EXPORT bool check_is_visible();
+cc_noinline OTR_COMPAT_EXPORT void set_is_visible(QWidget const& w, bool force = false);
+cc_noinline OTR_COMPAT_EXPORT bool check_is_visible();
diff --git a/compat/macros.hpp b/compat/macros.hpp
index 8b635201..57883827 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -7,43 +7,41 @@
#endif
#if defined _MSC_VER
-# define never_inline __declspec(noinline)
+# define cc_noinline __declspec(noinline)
#elif defined __GNUG__
-# define never_inline __attribute__((noinline))
+# define cc_noinline __attribute__((noinline))
#else
-# define never_inline
-#endif
-
-#if defined __cplusplus
-# define restrict_ptr __restrict
+# define cc_noinline
#endif
#if defined _MSC_VER
-# define force_inline __forceinline
+# define cc_forceinline __forceinline
#else
-# define force_inline __attribute__((always_inline, gnu_inline)) inline
+# define cc_forceinline __attribute__((always_inline, gnu_inline)) inline
#endif
#ifdef Q_CREATOR_RUN
-# define warn_result_unused
+# define cc_warn_unused_result
#elif defined _MSC_VER
-# define warn_result_unused _Check_return_
+# define cc_warn_unused_result _Check_return_
#else
-# define warn_result_unused __attribute__((warn_unused_result))
+# define cc_warn_unused_result __attribute__((warn_unused_result))
#endif
-#if defined __GNUC__
-# define likely(x) __builtin_expect(!!(x),1)
-# define unlikely(x) __builtin_expect(!!(x),0)
-#else
-# define likely(x) (x)
-# define unlikely(x) (x)
+#if !defined likely
+# if defined __GNUC__
+# define likely(x) __builtin_expect(!!(x),1)
+# define unlikely(x) __builtin_expect(!!(x),0)
+# else
+# define likely(x) (x)
+# define unlikely(x) (x)
+# endif
#endif
#if defined _MSC_VER
-# define OTR_FUNNAME (__FUNCSIG__)
+# define cc_function_name (__FUNCSIG__)
#else
-# define OTR_FUNNAME (__PRETTY_FUNCTION__)
+# define cc_function_name (__PRETTY_FUNCTION__)
#endif
#if !defined PP_CAT
@@ -65,10 +63,10 @@ using cv_qualified = std::conditional_t<std::is_fundamental_v<std::decay_t<t>>,
std::add_lvalue_reference_t<std::add_const_t<std::remove_reference_t<t>>>>;
template<bool>
-[[deprecated]] constexpr force_inline void static_warn() {}
+[[deprecated]] constexpr cc_forceinline void static_warn() {}
template<>
-constexpr force_inline void static_warn<true>() {}
+constexpr cc_forceinline void static_warn<true>() {}
#define static_warning(cond) \
static_warn<(cond)>(); \
diff --git a/compat/math.hpp b/compat/math.hpp
index 014604e6..eae1435e 100644
--- a/compat/math.hpp
+++ b/compat/math.hpp
@@ -68,7 +68,7 @@ inline auto uround(const t& val) -> std::enable_if_t<!std::is_integral_v<std::de
#include "macros.hpp"
template <typename T>
-static force_inline constexpr auto signum(T x)
+static cc_forceinline constexpr auto signum(T x)
{
return x < T(0) ? -1 : 1;
}
diff --git a/compat/run-in-thread.hpp b/compat/run-in-thread.hpp
index 4631fb0c..afe279f2 100644
--- a/compat/run-in-thread.hpp
+++ b/compat/run-in-thread.hpp
@@ -53,7 +53,7 @@ struct run_in_thread_traits<void>
}
template<typename F>
-auto never_inline
+auto cc_noinline
run_in_thread_sync(QObject* obj, F&& fun)
-> typename qt_impl_detail::run_in_thread_traits<decltype(fun())>::ret_type
{
diff --git a/compat/shm.h b/compat/shm.h
index 5ea6c80a..814ce90c 100644
--- a/compat/shm.h
+++ b/compat/shm.h
@@ -32,10 +32,10 @@ class OTR_COMPAT_EXPORT shm_wrapper final
#endif
public:
- never_inline shm_wrapper(const char *shm_name, const char *mutex_name, int map_size);
- never_inline ~shm_wrapper();
- never_inline bool lock();
- never_inline bool unlock();
- never_inline bool success();
+ cc_noinline shm_wrapper(const char *shm_name, const char *mutex_name, int map_size);
+ cc_noinline ~shm_wrapper();
+ cc_noinline bool lock();
+ cc_noinline bool unlock();
+ cc_noinline bool success();
inline void* ptr() { return mem; }
};
diff --git a/compat/warn.hpp b/compat/warn.hpp
index 403a3a45..7f3e21d0 100644
--- a/compat/warn.hpp
+++ b/compat/warn.hpp
@@ -13,10 +13,10 @@ namespace warn_detail {
template<typename t> using basic_string_stream = std::basic_ostringstream<t, std::char_traits<t>, std::allocator<t>>;
using string_stream = basic_string_stream<wchar_t>;
-force_inline void do_warn(string_stream&) {}
+cc_forceinline void do_warn(string_stream&) {}
template<typename x, typename... xs>
-force_inline void do_warn(string_stream& acc, const x& datum, const xs&... rest)
+cc_forceinline void do_warn(string_stream& acc, const x& datum, const xs&... rest)
{
acc << datum;
if (sizeof...(rest) > 0u)
@@ -25,7 +25,7 @@ force_inline void do_warn(string_stream& acc, const x& datum, const xs&... rest)
}
template<typename... xs>
-never_inline void warn_(const char* file, int line, const char* level, const xs&... seq)
+cc_noinline void warn_(const char* file, int line, const char* level, const xs&... seq)
{
using namespace warn_detail;
string_stream stream;
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp
index 6bab6a58..7bddec1c 100644
--- a/filter-accela/ftnoir_filter_accela.cpp
+++ b/filter-accela/ftnoir_filter_accela.cpp
@@ -21,7 +21,7 @@ accela::accela() : first_run(true)
}
template<int N = 3, typename F>
-never_inline
+cc_noinline
static void do_deltas(const double* deltas, double* output, F&& fun)
{
double norm[N];
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 9c9f35a6..7b4444c3 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -234,18 +234,18 @@ static bool is_nan(const dmat<u,w>& r)
}
template<typename x>
-static force_inline bool nan_check_(const x& datum)
+static cc_forceinline bool nan_check_(const x& datum)
{
return is_nan(datum);
}
template<typename x, typename y, typename... xs>
-static force_inline bool nan_check_(const x& datum, const y& next, const xs&... rest)
+static cc_forceinline bool nan_check_(const x& datum, const y& next, const xs&... rest)
{
return is_nan(datum) || nan_check_(next, rest...);
}
-static never_inline
+static cc_noinline
void emit_nan_check_msg(const char* text, const char* fun, int line)
{
once_only(
@@ -257,7 +257,7 @@ void emit_nan_check_msg(const char* text, const char* fun, int line)
}
template<typename... xs>
-static never_inline
+static cc_noinline
bool maybe_nan(const char* text, const char* fun, int line, const xs&... vals)
{
if (nan_check_(vals...))
@@ -273,7 +273,7 @@ bool maybe_nan(const char* text, const char* fun, int line, const xs&... vals)
#define nan_check(...) \
do \
{ \
- if (likely(!maybe_nan(#__VA_ARGS__, OTR_FUNNAME, __LINE__, __VA_ARGS__))) \
+ if (likely(!maybe_nan(#__VA_ARGS__, cc_function_name, __LINE__, __VA_ARGS__))) \
(void)0; \
else \
goto error; \
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp
index 79042727..4a676862 100644
--- a/logic/pipeline.hpp
+++ b/logic/pipeline.hpp
@@ -49,14 +49,14 @@ public:
void on_center();
- warn_result_unused
+ cc_warn_unused_result
euler_t rotate(const rmat& rmat, const euler_t& in, vec3_bool disable) const;
- warn_result_unused
+ cc_warn_unused_result
Pose apply_pipeline(reltrans_state state, const Pose& value,
const vec6_bool& disable, bool neck_enable, int neck_z);
- warn_result_unused
+ cc_warn_unused_result
euler_t apply_neck(const Pose& value, int nz, bool disable_tz) const;
};
diff --git a/options/bundle.hpp b/options/bundle.hpp
index 9b7b7f02..3ab6f74a 100644
--- a/options/bundle.hpp
+++ b/options/bundle.hpp
@@ -63,12 +63,12 @@ signals:
void saving() const;
void changed() const;
public:
- never_inline bundle(const QString& group_name);
- never_inline ~bundle() override;
+ cc_noinline bundle(const QString& group_name);
+ cc_noinline ~bundle() override;
QString name() const { return group_name; }
- never_inline void store_kv(const QString& name, const QVariant& datum);
- never_inline bool contains(const QString& name) const;
- never_inline bool is_modified() const;
+ cc_noinline void store_kv(const QString& name, const QVariant& datum);
+ cc_noinline bool contains(const QString& name) const;
+ cc_noinline bool is_modified() const;
template<typename t>
t get(const QString& name) const
diff --git a/options/group.cpp b/options/group.cpp
index 69378d51..77773744 100644
--- a/options/group.cpp
+++ b/options/group.cpp
@@ -190,7 +190,7 @@ std::shared_ptr<QSettings> group::cur_global_settings_object()
return cur_global_ini;
}
-never_inline
+cc_noinline
group::saver_::~saver_()
{
if (--refcount == 0 && modifiedp)
@@ -202,7 +202,7 @@ group::saver_::~saver_()
}
}
-never_inline
+cc_noinline
group::saver_::saver_(QSettings& s, int& refcount, bool& modifiedp) :
s(s), refcount(refcount), modifiedp(modifiedp)
{
diff --git a/options/group.hpp b/options/group.hpp
index c933b134..c3fce892 100644
--- a/options/group.hpp
+++ b/options/group.hpp
@@ -38,8 +38,8 @@ class OTR_OPTIONS_EXPORT group final
int& refcount;
bool& modifiedp;
- never_inline ~saver_();
- never_inline saver_(QSettings& s, int& refcount, bool& modifiedp);
+ cc_noinline ~saver_();
+ cc_noinline saver_(QSettings& s, int& refcount, bool& modifiedp);
};
static std::shared_ptr<QSettings> cur_settings_object();
static std::shared_ptr<QSettings> cur_global_settings_object();
@@ -60,7 +60,7 @@ public:
static void mark_ini_modified();
template<typename t>
- never_inline
+ cc_noinline
t get(const QString& k) const
{
auto value = kvs.find(k);
@@ -70,7 +70,7 @@ public:
}
template<typename F>
- never_inline
+ cc_noinline
static auto with_settings_object(F&& fun)
{
QMutexLocker l(&cur_ini_mtx);
diff --git a/options/slider.hpp b/options/slider.hpp
index 7570ace0..958214ce 100644
--- a/options/slider.hpp
+++ b/options/slider.hpp
@@ -32,7 +32,7 @@ namespace options
{}
template<typename t>
- never_inline
+ cc_noinline
explicit operator arith_conversion_t<t>() const
{
return t(cur_);
diff --git a/options/value.hpp b/options/value.hpp
index 47a4d631..42e72e50 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -42,7 +42,7 @@ class value final : public base_value
return val1.value<stored_type>() == val2.value<stored_type>();
}
- never_inline
+ cc_noinline
t get() const
{
if (self_name.isEmpty())
@@ -59,7 +59,7 @@ class value final : public base_value
}
public:
- never_inline
+ cc_noinline
t operator=(const t& datum)
{
if (self_name.isEmpty())
@@ -74,7 +74,7 @@ public:
static constexpr inline Qt::ConnectionType DIRECT_CONNTYPE = Qt::DirectConnection;
static constexpr inline Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection;
- never_inline
+ cc_noinline
value(bundle b, const QString& name, t def) :
base_value(b, name, &is_equal, std::type_index(typeid(stored_type))),
def(def)
@@ -91,49 +91,49 @@ public:
static_assert(k > 0, "");
}
- never_inline
+ cc_noinline
t default_value() const
{
return def;
}
- never_inline
+ cc_noinline
void set_to_default() override
{
*this = def;
}
- never_inline
+ cc_noinline
operator t() const { return get(); }
- never_inline
+ cc_noinline
t operator->() const
{
return get();
}
- never_inline
+ cc_noinline
void reload() override
{
if (!self_name.isEmpty())
*this = static_cast<t>(*this);
}
- never_inline
+ cc_noinline
void bundle_value_changed() const override
{
if (!self_name.isEmpty())
emit valueChanged(traits::to_storage(get()));
}
- never_inline
+ cc_noinline
t operator()() const
{
return get();
}
template<typename u>
- never_inline
+ cc_noinline
u to() const
{
return static_cast<u>(get());
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp
index 16788b4b..9b9a1478 100644
--- a/pose-widget/pose-widget.cpp
+++ b/pose-widget/pose-widget.cpp
@@ -282,8 +282,8 @@ void pose_transform::project_quad_texture()
const unsigned orig_pitch = tex.bytesPerLine();
const unsigned dest_pitch = image.bytesPerLine();
- unsigned char const* restrict_ptr orig = tex.constBits();
- unsigned char* restrict_ptr dest = image.bits();
+ unsigned char const* __restrict orig = tex.constBits();
+ unsigned char* __restrict dest = image.bits();
const int orig_depth = tex.depth() / 8;
const int dest_depth = image.depth() / 8;
@@ -304,7 +304,7 @@ void pose_transform::project_quad_texture()
for (int y = 0; y < dist.y(); y++)
for (int x = 0; x < dist.x(); x++)
{
- uv_* restrict_ptr uv = &uv_vec[y * dist.x() + x];
+ uv_* __restrict uv = &uv_vec[y * dist.x() + x];
if (!t.barycentric_coords(vec2(x + min.x(), y + min.y()), uv->coords, uv->i))
uv->i = -1;
}
@@ -330,7 +330,7 @@ void pose_transform::project_quad_texture()
for (int x_ = 0, dx = dist.x(); x_ < dx; x_++)
{
const int y = y_ + min.y(), x = x_ + min.x();
- const uv_* restrict_ptr uv__ = &uv_vec[y_ * dx + x_];
+ const uv_* __restrict uv__ = &uv_vec[y_ * dx + x_];
if (uv__->i != -1)
{
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 57787093..389e12b2 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -25,7 +25,7 @@ static_assert(sizeof(LONG) == 4u, "");
static constexpr inline float d2r = float(M_PI/180);
-never_inline void store(float volatile& place, const float value)
+cc_noinline void store(float volatile& place, const float value)
{
union
{
@@ -42,13 +42,13 @@ never_inline void store(float volatile& place, const float value)
}
template<typename t>
-force_inline void store(t volatile& place, t value)
+cc_forceinline void store(t volatile& place, t value)
{
static_assert(sizeof(t) == 4u, "");
(void)InterlockedExchange((LONG volatile*) &place, value);
}
-force_inline std::int32_t load(std::int32_t volatile& place)
+cc_forceinline std::int32_t load(std::int32_t volatile& place)
{
return InterlockedCompareExchange((volatile LONG*) &place, 0, 0);
}
diff --git a/qxt-mini/powerset.hpp b/qxt-mini/powerset.hpp
index ebb02ba8..7847548e 100644
--- a/qxt-mini/powerset.hpp
+++ b/qxt-mini/powerset.hpp
@@ -66,8 +66,8 @@ private:
};
template<typename t, typename... xs>
-auto force_inline
-make_powerset(const t& arg, const xs&... args)
+auto
+cc_forceinline make_powerset(const t& arg, const xs&... args)
{
using cnt = std::integral_constant<std::uintptr_t, sizeof...(xs)+1>;
using p = powerset<t, cnt::value>;
diff --git a/spline/spline.cpp b/spline/spline.cpp
index ad2ea6b3..cb2d5deb 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -96,7 +96,7 @@ float spline::get_value_no_save_internal(double x)
return ret;
}
-warn_result_unused bool spline::get_last_value(QPointF& point)
+cc_warn_unused_result bool spline::get_last_value(QPointF& point)
{
QMutexLocker foo(&_mutex);
point = last_input_value;
diff --git a/spline/spline.hpp b/spline/spline.hpp
index 300af92d..6771a1cb 100644
--- a/spline/spline.hpp
+++ b/spline/spline.hpp
@@ -56,7 +56,7 @@ struct OTR_SPLINE_EXPORT base_spline_
virtual float get_value(double x) = 0;
virtual float get_value_no_save(double x) const = 0;
- warn_result_unused virtual bool get_last_value(QPointF& point) = 0;
+ cc_warn_unused_result virtual bool get_last_value(QPointF& point) = 0;
virtual void set_tracking_active(bool value) = 0;
virtual double max_input() const = 0;
@@ -133,7 +133,7 @@ public:
float get_value(double x) override;
float get_value_no_save(double x) const override;
- warn_result_unused bool get_last_value(QPointF& point) override;
+ cc_warn_unused_result bool get_last_value(QPointF& point) override;
void add_point(QPointF pt) override;
void add_point(double x, double y) override;
diff --git a/tracker-pt/module/camera.h b/tracker-pt/module/camera.h
index 79e3dca0..05ca93dd 100644
--- a/tracker-pt/module/camera.h
+++ b/tracker-pt/module/camera.h
@@ -40,7 +40,7 @@ struct Camera final : pt_camera
void show_camera_settings() override;
private:
- warn_result_unused bool _get_frame(cv::Mat& Frame);
+ cc_warn_unused_result bool _get_frame(cv::Mat& Frame);
double dt_mean = 0, fov = 30;
Timer t;
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index dd7b6961..427925ab 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -57,7 +57,7 @@ static cv::Vec2d MeanShiftIteration(const cv::Mat &frame_gray, const vec2 &curre
vec2 com { 0, 0 };
for (int i = 0; i < frame_gray.rows; i++)
{
- auto frame_ptr = (uint8_t const* restrict_ptr)frame_gray.ptr(i);
+ auto frame_ptr = (uint8_t const* __restrict)frame_gray.ptr(i);
for (int j = 0; j < frame_gray.cols; j++)
{
f val = frame_ptr[j];
@@ -180,7 +180,7 @@ void PointExtractor::threshold_image(const cv::Mat& frame_gray, cv::Mat1b& outpu
const f radius = (f) threshold_radius_value(frame_gray.cols, frame_gray.rows, threshold_slider_value);
- float const* const restrict_ptr ptr = (float*) hist.ptr(0);
+ float const* const __restrict ptr = (float*) hist.ptr(0);
const unsigned area = uround(3 * M_PI * radius*radius);
const unsigned sz = unsigned(hist.cols * hist.rows);
unsigned thres = 32;
@@ -244,8 +244,8 @@ void PointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_
for (int i=rect.y; i < ymax; i++)
{
- unsigned char const* const restrict_ptr ptr_blobs = frame_blobs.ptr(i);
- unsigned char const* const restrict_ptr ptr_gray = frame_gray.ptr(i);
+ unsigned char const* const __restrict ptr_blobs = frame_blobs.ptr(i);
+ unsigned char const* const __restrict ptr_gray = frame_gray.ptr(i);
for (int j=rect.x; j < xmax; j++)
{
if (ptr_blobs[j] != idx)
diff --git a/tracker-pt/pt-api.hpp b/tracker-pt/pt-api.hpp
index 7ddddaf5..0ddfb4e1 100644
--- a/tracker-pt/pt-api.hpp
+++ b/tracker-pt/pt-api.hpp
@@ -69,11 +69,11 @@ struct pt_camera
pt_camera();
virtual ~pt_camera();
- virtual warn_result_unused bool start(int idx, int fps, int res_x, int res_y) = 0;
+ virtual cc_warn_unused_result bool start(int idx, int fps, int res_x, int res_y) = 0;
virtual void stop() = 0;
- virtual warn_result_unused result get_frame(pt_frame& frame) = 0;
+ virtual cc_warn_unused_result result get_frame(pt_frame& frame) = 0;
- virtual warn_result_unused result get_info() const = 0;
+ virtual cc_warn_unused_result result get_info() const = 0;
virtual pt_camera_info get_desired() const = 0;
virtual QString get_desired_name() const = 0;
diff --git a/tracker-steamvr/steamvr.hpp b/tracker-steamvr/steamvr.hpp
index c4e10adb..8c76ad17 100644
--- a/tracker-steamvr/steamvr.hpp
+++ b/tracker-steamvr/steamvr.hpp
@@ -54,7 +54,7 @@ struct device_list final
void refresh_device_list();
const QList<device_spec>& devices() const { return device_specs; }
- static never_inline maybe_pose get_pose(int k);
+ static cc_noinline maybe_pose get_pose(int k);
static QString error_string(vr_error_t error);
static constexpr inline unsigned max_devices = vr::k_unMaxTrackedDeviceCount;