• R/O
  • SSH
  • HTTPS

eirrepo: Commit


Commit MetaInfo

Revision86 (tree)
Time2018-04-17 14:46:49
Authorquiret

Log Message

- added a way to circumvent the default equal-char optimization of ConvertStrings class of functions

Change Summary

Incremental Difference

--- common/sdk/UniChar.h (revision 85)
+++ common/sdk/UniChar.h (revision 86)
@@ -1082,10 +1082,10 @@
10821082 }
10831083 }
10841084
1085- template <typename inputCharType, typename outputCharType>
1085+ template <typename inputCharType, typename outputCharType, bool optimizeEqual = true>
10861086 inline std::basic_string <outputCharType> ConvertStringsLength( const inputCharType *inputChars, size_t inputLen )
10871087 {
1088- if constexpr ( std::is_same <inputCharType, outputCharType>::value )
1088+ if constexpr ( optimizeEqual && std::is_same <inputCharType, outputCharType>::value )
10891089 {
10901090 return std::basic_string <outputCharType> ( inputChars, inputLen );
10911091 }
@@ -1112,10 +1112,10 @@
11121112 }
11131113 }
11141114
1115- template <typename inputCharType, typename outputCharType>
1115+ template <typename inputCharType, typename outputCharType, bool optimizeEqual = true>
11161116 inline std::basic_string <outputCharType> ConvertStrings( const std::basic_string <inputCharType>& inputStr )
11171117 {
1118- if constexpr ( std::is_same <inputCharType, outputCharType>::value )
1118+ if constexpr ( optimizeEqual && std::is_same <inputCharType, outputCharType>::value )
11191119 {
11201120 return inputStr;
11211121 }
Show on old repository browser