diff options
-rwxr-xr-x[-rw-r--r--] | gtk/Converter.h | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | gtk/PlatGTK.cxx | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | gtk/ScintillaGTK.cxx | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | gtk/ScintillaGTK.h | 6 |
4 files changed, 47 insertions, 1 deletions
diff --git a/gtk/Converter.h b/gtk/Converter.h index eb665b4b6..30bb781ac 100644..100755 --- a/gtk/Converter.h +++ b/gtk/Converter.h @@ -29,6 +29,11 @@ public: iconvh = iconvhBad; Open(charSetDestination, charSetSource, transliterations); } + // Deleted so Converter objects can not be copied. + Converter(const Converter &) = delete; + Converter(Converter &&) = delete; + Converter &operator=(const Converter &) = delete; + Converter &operator=(Converter &&) = delete; ~Converter() { Close(); } diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 5e19769c0..a319e31ba 100644..100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -81,6 +81,11 @@ public: pfd = pfd_; characterSet = characterSet_; } + // Deleted so FontHandle objects can not be copied. + FontHandle(const FontHandle &) = delete; + FontHandle(FontHandle &&) = delete; + FontHandle &operator=(const FontHandle &) = delete; + FontHandle &operator=(FontHandle &&) = delete; ~FontHandle() { if (pfd) pango_font_description_free(pfd); @@ -146,6 +151,11 @@ class SurfaceImpl : public Surface { void SetConverter(int characterSet_); public: SurfaceImpl() noexcept; + // Deleted so SurfaceImpl objects can not be copied. + SurfaceImpl(const SurfaceImpl&) = delete; + SurfaceImpl(SurfaceImpl&&) = delete; + SurfaceImpl&operator=(const SurfaceImpl&) = delete; + SurfaceImpl&operator=(SurfaceImpl&&) = delete; ~SurfaceImpl() override; void Init(WindowID wid) override; @@ -755,6 +765,12 @@ public: iter = pango_layout_get_iter(layout); pango_layout_iter_get_cluster_extents(iter, nullptr, &pos); } + // Deleted so ClusterIterator objects can not be copied. + ClusterIterator(const ClusterIterator&) = delete; + ClusterIterator(ClusterIterator&&) = delete; + ClusterIterator&operator=(const ClusterIterator&) = delete; + ClusterIterator&operator=(ClusterIterator&&) = delete; + ~ClusterIterator() { pango_layout_iter_free(iter); } @@ -1219,6 +1235,11 @@ public: #endif delegate(nullptr) { } + // Deleted so ListBoxX objects can not be copied. + ListBoxX(const ListBoxX&) = delete; + ListBoxX(ListBoxX&&) = delete; + ListBoxX&operator=(const ListBoxX&) = delete; + ListBoxX&operator=(ListBoxX&&) = delete; ~ListBoxX() override { if (pixhash) { g_hash_table_foreach((GHashTable *) pixhash, list_image_free, nullptr); @@ -1958,7 +1979,11 @@ public: explicit DynamicLibraryImpl(const char *modulePath) noexcept { m = g_module_open(modulePath, G_MODULE_BIND_LAZY); } - + // Deleted so DynamicLibraryImpl objects can not be copied. + DynamicLibraryImpl(const DynamicLibraryImpl&) = delete; + DynamicLibraryImpl(DynamicLibraryImpl&&) = delete; + DynamicLibraryImpl&operator=(const DynamicLibraryImpl&) = delete; + DynamicLibraryImpl&operator=(DynamicLibraryImpl&&) = delete; ~DynamicLibraryImpl() override { if (m != nullptr) g_module_close(m); diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 5da17aacf..9162010c4 100644..100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -433,6 +433,11 @@ public: uniStr = g_utf8_to_ucs4_fast(str, strlen(str), &uniStrLen); pscript = pango_script_for_unichar(uniStr[0]); } + // Deleted so PreEditString objects can not be copied. + PreEditString(const PreEditString&) = delete; + PreEditString(PreEditString&&) = delete; + PreEditString&operator=(const PreEditString&) = delete; + PreEditString&operator=(PreEditString&&) = delete; ~PreEditString() { g_free(str); g_free(uniStr); @@ -1202,6 +1207,11 @@ struct CaseMapper { mapped = g_utf8_strdown(sUTF8.c_str(), sUTF8.length()); } } + // Deleted so CaseMapper objects can not be copied. + CaseMapper(const CaseMapper&) = delete; + CaseMapper(CaseMapper&&) = delete; + CaseMapper&operator=(const CaseMapper&) = delete; + CaseMapper&operator=(CaseMapper&&) = delete; ~CaseMapper() { g_free(mapped); } diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h index b87808824..357efee8a 100644..100755 --- a/gtk/ScintillaGTK.h +++ b/gtk/ScintillaGTK.h @@ -274,6 +274,12 @@ public: g_object_weak_ref(weakRef, WeakNotify, this); } + // Deleted so GObjectWatcher objects can not be copied. + GObjectWatcher(const GObjectWatcher&) = delete; + GObjectWatcher(GObjectWatcher&&) = delete; + GObjectWatcher&operator=(const GObjectWatcher&) = delete; + GObjectWatcher&operator=(GObjectWatcher&&) = delete; + virtual ~GObjectWatcher() { if (weakRef) { g_object_weak_unref(weakRef, WeakNotify, this); |