From 4d42584ca03c507c0ef2ea17cab605cc541f10dc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 Oct 2015 15:19:19 -0400 Subject: [PATCH] Column: Implemented ::renderDouble --- src/columns/Column.cpp | 13 +++++++++++++ src/columns/Column.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/columns/Column.cpp b/src/columns/Column.cpp index add6e376b..1356cee72 100644 --- a/src/columns/Column.cpp +++ b/src/columns/Column.cpp @@ -277,3 +277,16 @@ void Column::renderInteger ( } //////////////////////////////////////////////////////////////////////////////// +void Column::renderDouble ( + std::vector & lines, + int width, + Color& color, + double value) +{ + lines.push_back ( + color.colorize ( + rightJustify ( + format (value, 4, 3), width))); +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/columns/Column.h b/src/columns/Column.h index 07b0ef9b4..2ff7712f1 100644 --- a/src/columns/Column.h +++ b/src/columns/Column.h @@ -67,6 +67,7 @@ public: protected: void renderInteger (std::vector &, int, Color&, int); + void renderDouble (std::vector &, int, Color&, double); protected: std::string _name;