Fixed some 'false' value implicitly cast to the integer type.

This commit is contained in:
dankan1890 2016-08-14 23:48:42 +02:00
parent eed3ffd5b6
commit cdba162897
2 changed files with 3 additions and 3 deletions

View File

@ -393,7 +393,7 @@ namespace nana
int n = trace_.logic_pos.y * rows + trace_.logic_pos.x + 1; int n = trace_.logic_pos.y * rows + trace_.logic_pos.x + 1;
if (page_mode::date == page) if (page_mode::date == page)
{ {
if (n < 8) return false; //Here is week title bar if (n < 8) return 0; //Here is week title bar
int dw = nana::date::day_of_week(view_month_.year, view_month_.month, 1); int dw = nana::date::day_of_week(view_month_.year, view_month_.month, 1);
n -= (dw ? dw + 7 : 14); n -= (dw ? dw + 7 : 14);
} }

View File

@ -140,13 +140,13 @@ namespace paint
unsigned font::height() const unsigned font::height() const
{ {
if(empty()) return false; if(empty()) return 0;
return (impl_->font_ptr->height); return (impl_->font_ptr->height);
} }
unsigned font::weight() const unsigned font::weight() const
{ {
if(empty()) return false; if(empty()) return 0;
return (impl_->font_ptr->weight); return (impl_->font_ptr->weight);
} }