summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
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 /tracker-pt
parent0f182b791622ad4491c8aabf8edce21a63839bdc (diff)
compat/macros: rename portability macros
use `cc_xx' rather than awkward synonyms.
Diffstat (limited to 'tracker-pt')
-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
3 files changed, 8 insertions, 8 deletions
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;