diff --git a/src/Chart.cpp b/src/Chart.cpp index bb8fe619..14aec68a 100644 --- a/src/Chart.cpp +++ b/src/Chart.cpp @@ -82,7 +82,7 @@ std::string Chart::render ( const auto chars_per_hour = 60 / minutes_per_char; const auto cell_size = chars_per_hour + spacing; - const auto indent_size = getIndentSize (with_label_month, with_label_week, with_label_day, with_label_weekday); + const auto indent_size = getIndentSize (); const auto indent = std::string (indent_size, ' '); const auto padding_size = indent_size + ((last_hour - first_hour + 1) * (cell_size)) + 1; @@ -176,16 +176,12 @@ std::string Chart::render ( } //////////////////////////////////////////////////////////////////////////////// -unsigned long Chart::getIndentSize ( - const bool with_month, - const bool with_week, - const bool with_day, - const bool with_weekday) +unsigned long Chart::getIndentSize () { - return (with_month ? 4 : 0) + - (with_week ? 4 : 0) + - (with_day ? 3 : 0) + - (with_weekday ? 4 : 0); + return (with_label_month ? 4 : 0) + + (with_label_week ? 4 : 0) + + (with_label_day ? 3 : 0) + + (with_label_weekday ? 4 : 0); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/Chart.h b/src/Chart.h index ffeee124..760e3c12 100644 --- a/src/Chart.h +++ b/src/Chart.h @@ -39,7 +39,7 @@ public: std::string render (const Interval&, const std::vector &, const std::vector &, const std::map &, const std::map &, const Color&, const Color&, const Color&, const Color&, bool, bool, bool, bool, bool, bool, bool, int, int, int); private: - unsigned long getIndentSize (bool, bool, bool, bool); + unsigned long getIndentSize (); std::pair determineHourRange (const Interval&, const std::vector &);