aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rwxr-xr-xgtk/ScintillaGTK.cxx8
-rwxr-xr-xgtk/ScintillaGTK.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 0383745fb..61ce04ad0 100755
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1150,14 +1150,14 @@ public:
}
};
-CaseFolder *ScintillaGTK::CaseFolderForEncoding() {
+std::unique_ptr<CaseFolder> ScintillaGTK::CaseFolderForEncoding() {
if (pdoc->dbcsCodePage == SC_CP_UTF8) {
- return new CaseFolderUnicode();
+ return std::make_unique<CaseFolderUnicode>();
} else {
const char *charSetBuffer = CharacterSetID();
if (charSetBuffer) {
if (pdoc->dbcsCodePage == 0) {
- CaseFolderTable *pcf = new CaseFolderTable();
+ std::unique_ptr<CaseFolderTable> pcf = std::make_unique<CaseFolderTable>();
pcf->StandardASCII();
// Only for single byte encodings
for (int i=0x80; i<0x100; i++) {
@@ -1180,7 +1180,7 @@ CaseFolder *ScintillaGTK::CaseFolderForEncoding() {
}
return pcf;
} else {
- return new CaseFolderDBCS(charSetBuffer);
+ return std::make_unique<CaseFolderDBCS>(charSetBuffer);
}
}
return nullptr;
diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h
index d83082517..a671f5b7a 100755
--- a/gtk/ScintillaGTK.h
+++ b/gtk/ScintillaGTK.h
@@ -123,7 +123,7 @@ private:
void NotifyKey(int key, int modifiers);
void NotifyURIDropped(const char *list);
const char *CharacterSetID() const;
- CaseFolder *CaseFolderForEncoding() override;
+ std::unique_ptr<CaseFolder> CaseFolderForEncoding() override;
std::string CaseMapString(const std::string &s, int caseMapping) override;
int KeyDefault(int key, int modifiers) override;
void CopyToClipboard(const SelectionText &selectedText) override;