summaryrefslogtreecommitdiff
path: root/zen/string_traits.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:49:33 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:49:33 +0200
commita6e9143baf48bdc093788545636570808f9c103c (patch)
treed223a9360134cd8105a96ee0faf5c2643bd9141b /zen/string_traits.h
parent6.4 (diff)
downloadFreeFileSync-a6e9143baf48bdc093788545636570808f9c103c.tar.gz
FreeFileSync-a6e9143baf48bdc093788545636570808f9c103c.tar.bz2
FreeFileSync-a6e9143baf48bdc093788545636570808f9c103c.zip
6.5
Diffstat (limited to 'zen/string_traits.h')
-rw-r--r--zen/string_traits.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/string_traits.h b/zen/string_traits.h
index 887752c0..f192e045 100644
--- a/zen/string_traits.h
+++ b/zen/string_traits.h
@@ -162,7 +162,7 @@ struct GetCharType : ResultType<typename implementation::StringTraits<T>::CharTy
namespace implementation
{
template <class C> inline
-size_t cStringLength(const C* str) //strlen()
+size_t cStringLength(const C* str) //naive implementation seems somewhat faster than "optimized" strlen/wcslen!
{
assert_static((IsSameType<C, char>::value || IsSameType<C, wchar_t>::value));
size_t len = 0;
@@ -195,8 +195,8 @@ size_t strLength(const S& str, typename EnableIf<implementation::StringTraits<S>
inline size_t strLength(const char* str) { return implementation::cStringLength(str); }
inline size_t strLength(const wchar_t* str) { return implementation::cStringLength(str); }
-inline size_t strLength(char) { return 1; }
-inline size_t strLength(wchar_t) { return 1; }
+inline size_t strLength(char) { return 1; }
+inline size_t strLength(wchar_t) { return 1; }
inline size_t strLength(const StringRef<char >& ref) { return ref.length(); }
inline size_t strLength(const StringRef<wchar_t>& ref) { return ref.length(); }
}
bgstack15