diff options
Diffstat (limited to '')
-rw-r--r-- | src/string_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_util.h b/src/string_util.h index 683fada1b..c1d316f0c 100644 --- a/src/string_util.h +++ b/src/string_util.h @@ -32,6 +32,9 @@ gcc_const static inline char * deconst_string(const char *p) { +#ifdef __cplusplus + return const_cast<char *>(p); +#else union { const char *in; char *out; @@ -40,6 +43,7 @@ deconst_string(const char *p) }; return u.out; +#endif } /** |