remove some compiler warning

This commit is contained in:
Jinhao 2015-09-20 23:34:57 +08:00
parent 460490040e
commit c04751ac1a

View File

@ -1980,6 +1980,7 @@ namespace nana
} }
::nana::rectangle child_r; ::nana::rectangle child_r;
double split_range_begin = -1, split_range_end;
switch (child->dir) switch (child->dir)
{ {
default: default:
@ -1992,7 +1993,8 @@ namespace nana
if (split) if (split)
{ {
split->move(rectangle{ child_r.right(), child_r.y, splitter_px, child_r.height }); split->move(rectangle{ child_r.right(), child_r.y, splitter_px, child_r.height });
split->range(left - weight, right - static_cast<int>(splitter_px)); split_range_begin = left - weight;
split_range_end = right - static_cast<int>(splitter_px);
left += splitter_px; left += splitter_px;
} }
break; break;
@ -2005,7 +2007,8 @@ namespace nana
if (split) if (split)
{ {
split->move(rectangle{ child_r.x - static_cast<int>(splitter_px), child_r.y, splitter_px, child_r.height }); split->move(rectangle{ child_r.x - static_cast<int>(splitter_px), child_r.y, splitter_px, child_r.height });
split->range(left, right - static_cast<int>(splitter_px)+weight); split_range_begin = left;
split_range_end = right - static_cast<int>(splitter_px)+weight;
right -= splitter_px; right -= splitter_px;
} }
break; break;
@ -2018,7 +2021,8 @@ namespace nana
if (split) if (split)
{ {
split->move(rectangle{ child_r.x, child_r.bottom(), child_r.width, splitter_px }); split->move(rectangle{ child_r.x, child_r.bottom(), child_r.width, splitter_px });
split->range(top - weight, bottom - static_cast<int>(splitter_px)); split_range_begin = top - weight;
split_range_end = bottom - static_cast<int>(splitter_px);
top += splitter_px; top += splitter_px;
} }
break; break;
@ -2032,11 +2036,16 @@ namespace nana
{ {
bottom -= splitter_px; bottom -= splitter_px;
split->move(rectangle{ child_r.x, child_r.y - static_cast<int>(splitter_px), child_r.width, splitter_px }); split->move(rectangle{ child_r.x, child_r.y - static_cast<int>(splitter_px), child_r.width, splitter_px });
split->range(top, bottom + weight); split_range_begin = top;
split_range_end = bottom + weight;
} }
break; break;
} }
if (split_range_begin > -0.5)
split->range(static_cast<int>(split_range_begin), static_cast<int>(split_range_end));
if (is_vert) if (is_vert)
{ {
room.height -= child_r.height; room.height -= child_r.height;