diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-26 14:33:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-26 14:33:42 +0100 |
| commit | 22249987bb6fbbd8c4482a19c6eb85279e73c934 (patch) | |
| tree | 5477cd712d8556db606fa0b13e390141e0d68613 /src | |
| parent | 5476e16fcdf6ade80e768c41373ba7e4c54e0cf5 (diff) | |
Add optional precision parameter to raw_convert.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/raw_convert.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raw_convert.h b/src/raw_convert.h index 7b26b0c3..7728acec 100644 --- a/src/raw_convert.h +++ b/src/raw_convert.h @@ -27,11 +27,11 @@ namespace libdcp { */ template <typename P, typename Q> P -raw_convert (Q v) +raw_convert (Q v, int precision = 16) { std::stringstream s; s.imbue (std::locale::classic ()); - s << std::setprecision (16); + s << std::setprecision (precision); s << v; P r; s >> r; |
