]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/TextTable: do padding during final step
authorSage Weil <sage@redhat.com>
Fri, 16 Jan 2015 21:29:36 +0000 (13:29 -0800)
committerSage Weil <sage@redhat.com>
Sun, 18 Jan 2015 01:14:48 +0000 (17:14 -0800)
We don't know the full width until we get all table entries.  Do not do
any padding before that.  In particular, setw may left-pad on a column
that is left-justified.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/TextTable.h

index 282bf733ba5e5e06648e011e85a357e0130012e7..d17b2652243d600b36b987f03520f1bb4bd40d2f 100644 (file)
@@ -118,7 +118,6 @@ public:
     }
 
     // now store the rendered item with its proper width
-    oss << std::setw(width) << item;
     row[currow][curcol] = oss.str();
 
     curcol++;