|
@@ -113,8 +113,8 @@ public:
|
|
std::vector<std::tuple<T, T, T, T>> candidatePositions;
|
|
std::vector<std::tuple<T, T, T, T>> candidatePositions;
|
|
T left, top, right, bottom;
|
|
T left, top, right, bottom;
|
|
std::tie(left, top, right, bottom) = box;
|
|
std::tie(left, top, right, bottom) = box;
|
|
- left = std::max(0, left);
|
|
|
|
- top = std::max(0, top);
|
|
|
|
|
|
+ left = std::max(static_cast<T>(0), left);
|
|
|
|
+ top = std::max(static_cast<T>(0), top);
|
|
right = std::min(static_cast<T>(canvasWidth), right);
|
|
right = std::min(static_cast<T>(canvasWidth), right);
|
|
bottom = std::min(static_cast<T>(canvasHeight), bottom);
|
|
bottom = std::min(static_cast<T>(canvasHeight), bottom);
|
|
std::tuple<T, T, T, T> all = std::make_tuple(0, 0, static_cast<T>(canvasWidth), static_cast<T>(canvasHeight));
|
|
std::tuple<T, T, T, T> all = std::make_tuple(0, 0, static_cast<T>(canvasWidth), static_cast<T>(canvasHeight));
|