summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-14 02:49:38 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-14 02:49:38 -0500
commit7a447912216e467a402e48be49f143f1b4be8261 (patch)
tree4b0c70b1a9cc71a77a304672ac45dbdeef9c8c52 /src/value.cc
parent2d58224001e502111812aaecbc56fdf618147bf8 (diff)
downloadfork-ledger-7a447912216e467a402e48be49f143f1b4be8261.tar.gz
fork-ledger-7a447912216e467a402e48be49f143f1b4be8261.tar.bz2
fork-ledger-7a447912216e467a402e48be49f143f1b4be8261.zip
Optimization in the formatting of string values
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/value.cc b/src/value.cc
index ce852c2d..3f70ab3d 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1618,7 +1618,10 @@ void value_t::print(std::ostream& out,
break;
case STRING:
- justify(out, as_string(), first_width, right_justify);
+ if (first_width > 0)
+ justify(out, as_string(), first_width, right_justify);
+ else
+ out << as_string();
break;
case MASK: