diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-12 19:37:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-12 22:55:49 +0100 |
| commit | 6867cbd5ea8aad24238e1063c617792f410b90a4 (patch) | |
| tree | 232bc66d0232d46177cf555d187d412a7c7974db /src | |
| parent | c88d7a66e3751cac223704c68aa4278a9c0de638 (diff) | |
Add another raw_convert().
Diffstat (limited to 'src')
| -rw-r--r-- | src/raw_convert.cc | 8 | ||||
| -rw-r--r-- | src/raw_convert.h | 4 |
2 files changed, 12 insertions, 0 deletions
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 @@ -246,6 +246,14 @@ dcp::raw_convert (string v, int precision, bool fixed) template <> int +dcp::raw_convert(char* v, int precision, bool fixed) +{ + return locale_convert<int>(make_local (v), precision, fixed); +} + + +template <> +int dcp::raw_convert (char const * v, int precision, bool fixed) { return locale_convert<int> (make_local (v), precision, 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 @@ -154,6 +154,10 @@ raw_convert (std::string v, int, bool); template <> int +raw_convert (char* v, int, bool); + +template <> +int raw_convert (char const * v, int, bool); template <> |
