OLD | NEW |
1 #include <memory> | 1 #include <memory> |
2 #include <stdexcept> | 2 #include <stdexcept> |
3 #include <vector> | 3 #include <vector> |
4 | 4 |
5 #include <Windows.h> | 5 #include <Windows.h> |
6 #include <ShlObj.h> | 6 #include <ShlObj.h> |
7 | 7 |
8 #include "Utils.h" | 8 #include "Utils.h" |
9 | 9 |
10 namespace | 10 namespace |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 | 124 |
125 void ReplaceString(std::wstring& input, const std::wstring placeholder, const st
d::wstring replacement) | 125 void ReplaceString(std::wstring& input, const std::wstring placeholder, const st
d::wstring replacement) |
126 { | 126 { |
127 size_t replaceStart = input.find(placeholder); | 127 size_t replaceStart = input.find(placeholder); |
128 if (replaceStart != std::string::npos) | 128 if (replaceStart != std::string::npos) |
129 { | 129 { |
130 input.replace(replaceStart, placeholder.length(), replacement); | 130 input.replace(replaceStart, placeholder.length(), replacement); |
131 } | 131 } |
132 } | 132 } |
| 133 |
| 134 template <> |
| 135 std::string CreateConstString<std::string>(std::string val) |
| 136 { |
| 137 return val; |
| 138 } |
| 139 |
| 140 template <> |
| 141 std::wstring CreateConstString<std::wstring>(std::string val) |
| 142 { |
| 143 return std::wstring(val.begin(), val.end()); |
| 144 } |
OLD | NEW |