summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-26 14:33:42 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-26 14:33:42 +0100
commit22249987bb6fbbd8c4482a19c6eb85279e73c934 (patch)
tree5477cd712d8556db606fa0b13e390141e0d68613 /src
parent5476e16fcdf6ade80e768c41373ba7e4c54e0cf5 (diff)
Add optional precision parameter to raw_convert.h
Diffstat (limited to 'src')
-rw-r--r--src/raw_convert.h4
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;