diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-05 19:39:23 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-05 19:39:23 +1100 |
commit | b797dfefb2b599b0085fa8e03180b9d6648e0acd (patch) | |
tree | c60bfc710cdc19a0d75a940336dad09533d6dea8 /src/UniqueString.h | |
parent | 4f673191c5c43665599392b00c3710d0344d65e3 (diff) | |
download | scintilla-mirror-b797dfefb2b599b0085fa8e03180b9d6648e0acd.tar.gz |
Move UniqueStringCopy into its own source file UniqueString.cxx to hide the
implementation.
Diffstat (limited to 'src/UniqueString.h')
-rw-r--r-- | src/UniqueString.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/UniqueString.h b/src/UniqueString.h index 8d95cb1ab..44ba26652 100644 --- a/src/UniqueString.h +++ b/src/UniqueString.h @@ -19,15 +19,7 @@ using UniqueString = std::unique_ptr<const char[]>; /// Equivalent to strdup but produces a std::unique_ptr<const char[]> allocation to go /// into collections. -inline UniqueString UniqueStringCopy(const char *text) { - if (!text) { - return UniqueString(); - } - const size_t len = strlen(text); - char *sNew = new char[len + 1]; - std::copy(text, text + len + 1, sNew); - return UniqueString(sNew); -} +UniqueString UniqueStringCopy(const char *text); } |