From cdba16289742f5aaeecfa91110a18ae5ad67ecf9 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sun, 14 Aug 2016 23:48:42 +0200 Subject: [PATCH] Fixed some 'false' value implicitly cast to the integer type. --- source/gui/widgets/date_chooser.cpp | 2 +- source/paint/graphics.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gui/widgets/date_chooser.cpp b/source/gui/widgets/date_chooser.cpp index 0085f30b..aa824637 100644 --- a/source/gui/widgets/date_chooser.cpp +++ b/source/gui/widgets/date_chooser.cpp @@ -393,7 +393,7 @@ namespace nana int n = trace_.logic_pos.y * rows + trace_.logic_pos.x + 1; 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); n -= (dw ? dw + 7 : 14); } diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index 6cbfe571..aa606f4e 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -140,13 +140,13 @@ namespace paint unsigned font::height() const { - if(empty()) return false; + if(empty()) return 0; return (impl_->font_ptr->height); } unsigned font::weight() const { - if(empty()) return false; + if(empty()) return 0; return (impl_->font_ptr->weight); }