fixes typo (#3930)

This commit is contained in:
Artem Pavlenko 2018-07-05 09:37:49 +02:00
parent 735acb297a
commit 2c2669d655

View file

@ -37,7 +37,7 @@ image_view<T>::image_view(std::size_t x, std::size_t y, std::size_t width, std::
data_(data) data_(data)
{ {
if (x_ >= data_.width() && data_.width() > 0) x_ = data_.width() - 1; if (x_ >= data_.width() && data_.width() > 0) x_ = data_.width() - 1;
if (y_ >= data_.height() && data.height() > 0) y_ = data_.height() - 1; if (y_ >= data_.height() && data_.height() > 0) y_ = data_.height() - 1;
if (x_ + width_ > data_.width()) width_ = data_.width() - x_; if (x_ + width_ > data_.width()) width_ = data_.width() - x_;
if (y_ + height_ > data_.height()) height_ = data_.height() - y_; if (y_ + height_ > data_.height()) height_ = data_.height() - y_;
} }