diff --git a/source/basic_types.cpp b/source/basic_types.cpp index 8edc8a0f..c2e1a9aa 100644 --- a/source/basic_types.cpp +++ b/source/basic_types.cpp @@ -739,12 +739,12 @@ namespace nana int rectangle::right() const { - return static_cast(x + width); + return x + static_cast(width); } int rectangle::bottom() const { - return static_cast(y + height); + return y + static_cast(height); } bool rectangle::is_hit(int pos_x, int pos_y) const @@ -756,7 +756,7 @@ namespace nana bool rectangle::is_hit(const point& pos) const { return (x <= pos.x && pos.x < x + static_cast(width)) && - (y <= pos.y && pos.y < y + static_cast(height)); + (y <= pos.y && pos.y < y + static_cast(height)); } bool rectangle::empty() const