Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mem, str: fix build errors with gcc >= 4.6.0

  • Loading branch information...
commit 0bfd58559fee135d96788ba35115d5de68703609 1 parent b53f3cb
@bnoordhuis bnoordhuis authored
Showing with 16 additions and 16 deletions.
  1. +7 −7 include/tools_mem.h
  2. +9 −9 include/tools_str.h
View
14 include/tools_mem.h
@@ -83,6 +83,13 @@ inline void* memSet(void* dst, uint8_t b, size_t n)
return ::memset(dst, b, n);
}
+inline void* memCopy(void* dst, const void* src, size_t n)
+{
+ o3_trace_tools("memCopy");
+
+ return ::memcpy(dst, src, n);
+}
+
template<typename T>
inline void* memSet(void* dst, const T& x, size_t n)
{
@@ -95,13 +102,6 @@ inline void* memSet(void* dst, const T& x, size_t n)
return dst;
}
-inline void* memCopy(void* dst, const void* src, size_t n)
-{
- o3_trace_tools("memCopy");
-
- return ::memcpy(dst, src, n);
-}
-
inline void* memMove(void* dst, const void* src, size_t n)
{
o3_trace_tools("memMove");
View
18 include/tools_str.h
@@ -137,15 +137,6 @@ inline wchar_t* strCopy(wchar_t* dst, const wchar_t* src)
return ::wcscpy(dst, src);
}
-template<typename C>
-inline bool strToBool(const C* str)
-{
- o3_trace_tools("strToBool");
- const C STR_TRUE[] = { 't', 'r', 'u', 'e', '\0' };
-
- return strEquals(str, STR_TRUE) || strToInt32(str);
-}
-
inline int32_t strToInt32(const char* str)
{
o3_trace_tools("strToInt32");
@@ -196,6 +187,15 @@ inline double strToDouble(const wchar_t* str)
return ::wcstod(str, 0);
}
+template<typename C>
+inline bool strToBool(const C* str)
+{
+ o3_trace_tools("strToBool");
+ const C STR_TRUE[] = { 't', 'r', 'u', 'e', '\0' };
+
+ return strEquals(str, STR_TRUE) || strToInt32(str);
+}
+
inline size_t strPrintfv(char* str, const char* format, va_list ap)
{
o3_trace_tools("strPrintfv");
Please sign in to comment.
Something went wrong with that request. Please try again.