From b4c46f78da230ff3077bc2b96ac66f5ac017c7a2 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 15 Dec 2013 12:49:06 +1100 Subject: Make single argument constructors explicit to avoid unexpected conversions. --- gtk/PlatGTK.cxx | 4 ++-- gtk/ScintillaGTK.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index f3a75466e..da9171470 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -253,7 +253,7 @@ class FontCached : Font { int usage; LOGFONT lf; int hash; - FontCached(const FontParameters &fp); + explicit FontCached(const FontParameters &fp); ~FontCached() {} bool SameAs(const FontParameters &fp); virtual void Release(); @@ -1963,7 +1963,7 @@ class DynamicLibraryImpl : public DynamicLibrary { protected: GModule* m; public: - DynamicLibraryImpl(const char *modulePath) { + explicit DynamicLibraryImpl(const char *modulePath) { m = g_module_open(modulePath, G_MODULE_BIND_LAZY); } diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index b0e99e7a6..f2efd84fc 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -165,7 +165,7 @@ class ScintillaGTK : public ScintillaBase { ScintillaGTK &operator=(const ScintillaGTK &); public: - ScintillaGTK(_ScintillaObject *sci_); + explicit ScintillaGTK(_ScintillaObject *sci_); virtual ~ScintillaGTK(); static void ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class); private: @@ -1244,7 +1244,7 @@ const char *ScintillaGTK::CharacterSetID() const { class CaseFolderDBCS : public CaseFolderTable { const char *charSet; public: - CaseFolderDBCS(const char *charSet_) : charSet(charSet_) { + explicit CaseFolderDBCS(const char *charSet_) : charSet(charSet_) { StandardASCII(); } virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { -- cgit v1.2.3