aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UniqueString.cxx
diff options
context:
space:
mode:
authormitchell <unknown>2020-01-05 21:22:02 -0500
committermitchell <unknown>2020-01-05 21:22:02 -0500
commit60e87889d6438e386acf58c3967fb874af9aae82 (patch)
tree9c5c2660c59aff04ddedea19fa03fd271f8bba5c /src/UniqueString.cxx
parentdbb7374c185718655dd77c294eb281e8b93c538e (diff)
downloadscintilla-mirror-60e87889d6438e386acf58c3967fb874af9aae82.tar.gz
Added Sci::make_unique() and Sci::size() for better compatibility with the default branch.
std::make_unique() is c++14 and std::size() is c++17.
Diffstat (limited to 'src/UniqueString.cxx')
-rw-r--r--src/UniqueString.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UniqueString.cxx b/src/UniqueString.cxx
index cacc0a7d8..c4d616a10 100644
--- a/src/UniqueString.cxx
+++ b/src/UniqueString.cxx
@@ -21,8 +21,8 @@ UniqueString UniqueStringCopy(const char *text) {
return UniqueString();
}
const size_t len = strlen(text);
- std::unique_ptr<char[]> upcNew(new char[len + 1]);
- memcpy(&upcNew[0], text, len + 1);
+ std::unique_ptr<char[]> upcNew = Sci::make_unique<char[]>(len + 1);
+ memcpy(upcNew.get(), text, len + 1);
return UniqueString(upcNew.release());
}