From 6867cbd5ea8aad24238e1063c617792f410b90a4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Feb 2023 19:37:06 +0100 Subject: Add another raw_convert(). --- src/raw_convert.cc | 8 ++++++++ src/raw_convert.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/raw_convert.cc b/src/raw_convert.cc index 7d3d1a72..ae35d870 100644 --- a/src/raw_convert.cc +++ b/src/raw_convert.cc @@ -244,6 +244,14 @@ dcp::raw_convert (string v, int precision, bool fixed) } +template <> +int +dcp::raw_convert(char* v, int precision, bool fixed) +{ + return locale_convert(make_local (v), precision, fixed); +} + + template <> int dcp::raw_convert (char const * v, int precision, bool fixed) diff --git a/src/raw_convert.h b/src/raw_convert.h index dff860e9..51f5fbb6 100644 --- a/src/raw_convert.h +++ b/src/raw_convert.h @@ -152,6 +152,10 @@ template <> unsigned long long raw_convert (std::string v, int, bool); +template <> +int +raw_convert (char* v, int, bool); + template <> int raw_convert (char const * v, int, bool); -- cgit v1.2.3