From ea88fa654503090152d1fee5fdf5f017a2d33a24 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 5 May 2019 16:00:00 +0200 Subject: [PATCH] helpers: add to_string() for char Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7679168b6111f968269a85329a3152735feb0382 Author: Thilo Graf Date: 2019-05-05 (Sun, 05 May 2019) --- src/system/helpers.cpp | 7 +++++++ src/system/helpers.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 1a9eb11b9..49dc2731c 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -1411,6 +1411,13 @@ std::string to_string(unsigned long long i) s << i; return s.str(); } + +std::string to_string(char i) +{ + std::stringstream s; + s << i; + return s.str(); +} #endif /** diff --git a/src/system/helpers.h b/src/system/helpers.h index 0afbeea09..bca3dc7ae 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -134,6 +134,7 @@ std::string to_string(long); std::string to_string(unsigned long); std::string to_string(long long); std::string to_string(unsigned long long); +std::string to_string(char); #else /* hack... */ #define to_string(x) std::to_string(x)