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
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
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());