diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-02-12 09:44:12 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-02-13 08:30:00 +0100 |
commit | 07f40bd25442f25c0af948ae1b0dac7fdff1688c (patch) | |
tree | 3fca13d92b02bc3712d98c3c43f9612ae4c56cf1 /libqpdf/QPDF_Real.cc | |
parent | 8fbc8579f2481dc3eeb962e99522047291e16fbe (diff) | |
download | qpdf-07f40bd25442f25c0af948ae1b0dac7fdff1688c.tar.zst |
QUtil::double_to_string: trim trailing zeroes with option to disable
Diffstat (limited to 'libqpdf/QPDF_Real.cc')
-rw-r--r-- | libqpdf/QPDF_Real.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/QPDF_Real.cc b/libqpdf/QPDF_Real.cc index 396ea25f..55f61b35 100644 --- a/libqpdf/QPDF_Real.cc +++ b/libqpdf/QPDF_Real.cc @@ -7,8 +7,9 @@ QPDF_Real::QPDF_Real(std::string const& val) : { } -QPDF_Real::QPDF_Real(double value, int decimal_places) : - val(QUtil::double_to_string(value, decimal_places)) +QPDF_Real::QPDF_Real(double value, int decimal_places, + bool trim_trailing_zeroes) : + val(QUtil::double_to_string(value, decimal_places, trim_trailing_zeroes)) { } |