Add make-compile-vs2013.patch
[TortoiseGit.git] / ext / scintilla / make-compile-vs2013.patch
blobb39a32726778adef58fdb6890e8321a985e21169
1 ext/scintilla/src/UniqueString.h | 8 ++++----
2 1 file changed, 4 insertions(+), 4 deletions(-)
4 diff --git a/ext/scintilla/src/UniqueString.h b/ext/scintilla/src/UniqueString.h
5 index a5c64e053..a32a17a80 100644
6 --- a/ext/scintilla/src/UniqueString.h
7 +++ b/ext/scintilla/src/UniqueString.h
8 @@ -13,7 +13,7 @@
9 namespace Scintilla {
10 #endif
12 -using UniqueString = std::unique_ptr<const char[]>;
13 +using UniqueString = std::unique_ptr<char[]>;
15 /// Equivalent to strdup but produces a std::unique_ptr<const char[]> allocation to go
16 /// into collections.
17 @@ -22,9 +22,9 @@ inline UniqueString UniqueStringCopy(const char *text) {
18 return UniqueString();
20 const size_t len = strlen(text);
21 - char *sNew = new char[len + 1];
22 - std::copy(text, text + len + 1, sNew);
23 - return UniqueString(sNew);
24 + auto sNew = std::make_unique<char[]>(len + 1);
25 + std::copy(text, text + len + 1, sNew.get());
26 + return sNew;
29 #ifdef SCI_NAMESPACE