summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:14:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:21:36 +0100
commit398894b546fb6588049e889678943c124a90ec24 (patch)
treeb5db21f64a01c5e6d27920052e022728e9678611
parentb830658e3e1657de1ef8581a53b4298769c117ee (diff)
compat/macros: rename obnoxious macro
-rw-r--r--compat/macros.hpp6
-rw-r--r--spline/spline.cpp2
-rw-r--r--spline/spline.hpp2
-rw-r--r--tracker-pt/camera.cpp8
-rw-r--r--tracker-pt/camera.h8
5 files changed, 13 insertions, 13 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index fcb4fea3..bf134c75 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -39,11 +39,11 @@
#endif
#ifdef Q_CREATOR_RUN
-# define DEFUN_WARN_UNUSED
+# define warn_result_unused
#elif defined(_MSC_VER)
-# define DEFUN_WARN_UNUSED _Check_return_
+# define warn_result_unused _Check_return_
#else
-# define DEFUN_WARN_UNUSED __attribute__((warn_unused_result))
+# define warn_result_unused __attribute__((warn_unused_result))
#endif
#if defined(__GNUG__)
diff --git a/spline/spline.cpp b/spline/spline.cpp
index 119723fd..d58d7c21 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -99,7 +99,7 @@ float spline::get_value_no_save_internal(double x)
return ret;
}
-DEFUN_WARN_UNUSED bool spline::get_last_value(QPointF& point)
+warn_result_unused 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 54c53767..47266165 100644
--- a/spline/spline.hpp
+++ b/spline/spline.hpp
@@ -92,7 +92,7 @@ public:
float get_value(double x);
float get_value_no_save(double x) const;
- DEFUN_WARN_UNUSED bool get_last_value(QPointF& point);
+ warn_result_unused bool get_last_value(QPointF& point);
void remove_point(int i);
void clear();
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index e2bcc4b9..f218a6d6 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -36,14 +36,14 @@ double CamInfo::get_focal_length() const
//static bool once = false; if (!once) { once = true; qDebug() << "f" << ret << "fov" << (fov * 180/M_PI); }
}
-DEFUN_WARN_UNUSED Camera::result Camera::get_info() const
+warn_result_unused Camera::result Camera::get_info() const
{
if (cam_info.res_x == 0 || cam_info.res_y == 0)
return result(false, CamInfo());
return result(true, cam_info);
}
-DEFUN_WARN_UNUSED Camera::result Camera::get_frame(cv::Mat& frame)
+warn_result_unused Camera::result Camera::get_frame(cv::Mat& frame)
{
const bool new_frame = _get_frame(frame);
@@ -72,7 +72,7 @@ DEFUN_WARN_UNUSED Camera::result Camera::get_frame(cv::Mat& frame)
return result(false, CamInfo());
}
-DEFUN_WARN_UNUSED Camera::open_status Camera::start(int idx, int fps, int res_x, int res_y)
+warn_result_unused Camera::open_status Camera::start(int idx, int fps, int res_x, int res_y)
{
if (idx >= 0 && fps >= 0 && res_x >= 0 && res_y >= 0)
{
@@ -135,7 +135,7 @@ void Camera::stop()
cam_desired = CamInfo();
}
-DEFUN_WARN_UNUSED bool Camera::_get_frame(cv::Mat& frame)
+warn_result_unused bool Camera::_get_frame(cv::Mat& frame)
{
if (cap && cap->isOpened())
{
diff --git a/tracker-pt/camera.h b/tracker-pt/camera.h
index 388b9234..97dfa029 100644
--- a/tracker-pt/camera.h
+++ b/tracker-pt/camera.h
@@ -43,11 +43,11 @@ struct Camera final
Camera() : dt_mean(0), fov(0) {}
- DEFUN_WARN_UNUSED open_status start(int idx, int fps, int res_x, int res_y);
+ warn_result_unused open_status start(int idx, int fps, int res_x, int res_y);
void stop();
- DEFUN_WARN_UNUSED result get_frame(cv::Mat& frame);
- DEFUN_WARN_UNUSED result get_info() const;
+ warn_result_unused result get_frame(cv::Mat& frame);
+ warn_result_unused result get_info() const;
CamInfo get_desired() const { return cam_desired; }
QString get_desired_name() const;
@@ -62,7 +62,7 @@ struct Camera final
void set_fov(double value) { fov = value; }
private:
- DEFUN_WARN_UNUSED bool _get_frame(cv::Mat& frame);
+ warn_result_unused bool _get_frame(cv::Mat& frame);
double dt_mean;
double fov;