aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/StringUtil.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-07 19:58:52 +0200
committerMax Kellermann <max@duempel.org>2013-08-07 19:58:52 +0200
commitabe090ec1f2255ce422f74e5b59bffc83aaff875 (patch)
treea5fb54e1484faeb549b9b0c1c5b27936a63a9099 /src/util/StringUtil.hxx
parentdff05c71e61b2fe1aab4bef4fabf9bb093769bf1 (diff)
downloadmpd-abe090ec1f2255ce422f74e5b59bffc83aaff875.tar.gz
mpd-abe090ec1f2255ce422f74e5b59bffc83aaff875.tar.xz
mpd-abe090ec1f2255ce422f74e5b59bffc83aaff875.zip
*: remove remaining __cplusplus checks
Diffstat (limited to '')
-rw-r--r--src/util/StringUtil.hxx24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx
index 72d613798..6eeca893d 100644
--- a/src/util/StringUtil.hxx
+++ b/src/util/StringUtil.hxx
@@ -23,28 +23,6 @@
#include "gcc.h"
/**
- * Remove the "const" attribute from a string pointer. This is a
- * dirty hack, don't use it unless you know what you're doing!
- */
-gcc_const
-static inline char *
-deconst_string(const char *p)
-{
-#ifdef __cplusplus
- return const_cast<char *>(p);
-#else
- union {
- const char *in;
- char *out;
- } u = {
- .in = p,
- };
-
- return u.out;
-#endif
-}
-
-/**
* Returns a pointer to the first non-whitespace character in the
* string, or to the end of the string.
*
@@ -62,7 +40,7 @@ gcc_pure
static inline char *
strchug_fast(char *p)
{
- return deconst_string(strchug_fast_c(p));
+ return const_cast<char *>(strchug_fast_c(p));
}
/**