From 1d1be49bbdb93aa184e7ffba27c8c3317a1f53ec Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 2 Nov 2015 08:13:00 -0500 Subject: [PATCH] ColUDA: No point using utf8_width on non-UTF8 data --- src/columns/ColUDA.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/columns/ColUDA.cpp b/src/columns/ColUDA.cpp index 222cda2b8..9efeb4440 100644 --- a/src/columns/ColUDA.cpp +++ b/src/columns/ColUDA.cpp @@ -99,7 +99,7 @@ void ColumnUDA::measure (Task& task, unsigned int& minimum, unsigned int& maximu } else if (_type == "duration") { - minimum = maximum = utf8_width (ISO8601p (value).format ()); + minimum = maximum = ISO8601p (value).format ().length (); } else if (_type == "string") { @@ -109,7 +109,7 @@ void ColumnUDA::measure (Task& task, unsigned int& minimum, unsigned int& maximu } else if (_type == "numeric") { - minimum = maximum = utf8_width (value); + minimum = maximum = value.length (); } } } @@ -167,7 +167,6 @@ void ColumnUDA::render ( else if (_type == "numeric") renderStringRight (lines, width, color, value); - } else if (_style == "indicator") {