summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/pose-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 18:54:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:32:10 +0100
commita88e34b21b07f70123926fcb5c505d6afdf99807 (patch)
tree905059194dcc64c7c163b8912947d8173fd4cc91 /pose-widget/pose-widget.cpp
parent5bf85412e4eacf92acc936b6e74bce0e2b1055d9 (diff)
style/quality only
No functional changes. - add `override' everywhere where missing - almost pass clang's `-Wweak-vtables' - avoid some float/double conversions - remove unused private members - make signedness conversions explicit - put stuff in right namespaces to aid analysis
Diffstat (limited to 'pose-widget/pose-widget.cpp')
-rw-r--r--pose-widget/pose-widget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp
index b10578d9..d9b563e9 100644
--- a/pose-widget/pose-widget.cpp
+++ b/pose-widget/pose-widget.cpp
@@ -182,7 +182,7 @@ bool Triangle::barycentric_coords(const vec2& px, vec2& uv, int& i) const
std::pair<vec2i, vec2i> pose_transform::get_bounds(const vec2& size)
{
- const int x = size.x(), y = size.y();
+ const num x = size.x(), y = size.y();
const vec3 corners[] = {
{ -x, -y, 0 },
@@ -350,8 +350,8 @@ void pose_transform::project_quad_texture()
const unsigned px_ = fx + 1;
const unsigned py_ = fy + 1;
#endif
- const unsigned px = fx;
- const unsigned py = fy;
+ const unsigned px = (unsigned)fx;
+ const unsigned py = (unsigned)fy;
const unsigned orig_pos = py * orig_pitch + px * const_depth;
#if defined BILINEAR_FILTER
@@ -380,7 +380,7 @@ void pose_transform::project_quad_texture()
dest[pos + k] = orig[orig_pos + k];
else
for (int k = 0; k < 3; k++)
- dest[pos + k] = bgcolor(k);
+ dest[pos + k] = (unsigned char)bgcolor(k);
}
}
}