diff --git a/moo/moocpp/gobjptr.h b/moo/moocpp/gobjptr.h index 1df18f72..402ff487 100644 --- a/moo/moocpp/gobjptr.h +++ b/moo/moocpp/gobjptr.h @@ -86,7 +86,7 @@ public: return ObjectPtr(obj, ObjectMemPolicy::CopyReference); } - ObjectPtr& operator=(nullptr_t) + ObjectPtr& operator=(std::nullptr_t) { reset(); return *this; @@ -127,7 +127,7 @@ public: return m_p == nullptr; } - bool operator==(const nullptr_t&) const + bool operator==(const std::nullptr_t&) const { return m_p == nullptr; } diff --git a/moo/moocpp/gstr.cpp b/moo/moocpp/gstr.cpp index 3affc841..df4f436f 100644 --- a/moo/moocpp/gstr.cpp +++ b/moo/moocpp/gstr.cpp @@ -20,7 +20,7 @@ gstr::gstr() { } -gstr::gstr(nullptr_t) +gstr::gstr(std::nullptr_t) : gstr() { } @@ -112,7 +112,7 @@ bool gstr::operator==(const char* other) const return strcmp(get(), other ? other : "") == 0; } -bool gstr::operator==(nullptr_t) const +bool gstr::operator==(std::nullptr_t) const { return empty(); } diff --git a/moo/moocpp/gstr.h b/moo/moocpp/gstr.h index 768bbb9d..36f68500 100644 --- a/moo/moocpp/gstr.h +++ b/moo/moocpp/gstr.h @@ -30,7 +30,7 @@ class gstr { public: gstr(); - gstr(nullptr_t); + gstr(std::nullptr_t); explicit gstr(const char* s); gstr(char* s, bool); ~gstr(); @@ -52,7 +52,7 @@ public: bool operator==(const gstr& other) const; bool operator==(const char* other) const; - bool operator==(nullptr_t) const; + bool operator==(std::nullptr_t) const; template bool operator!=(const T& other) const diff --git a/moo/mooedit/mooeditor-tests.cpp b/moo/mooedit/mooeditor-tests.cpp index 035e8877..c76d0084 100644 --- a/moo/mooedit/mooeditor-tests.cpp +++ b/moo/mooedit/mooeditor-tests.cpp @@ -32,7 +32,7 @@ check_contents (const gstr& filename, if (!g_file_get_contents (filename.get(), &contents, NULL, &error)) { TEST_FAILED_MSG ("could not load file '%s': %s", - filename, error->message); + filename.get(), error->message); g_error_free (error); return; } @@ -223,7 +223,7 @@ test_suite_init (G_GNUC_UNUSED gpointer data) if (_moo_mkdir_with_parents (test_data.working_dir.get(), &err) != 0) { g_critical ("could not create directory '%s': %s", - test_data.working_dir, + test_data.working_dir.get(), mgw_strerror (err)); test_data.working_dir.clear(); return FALSE; @@ -242,7 +242,7 @@ test_suite_cleanup (G_GNUC_UNUSED gpointer data) if (!_moo_remove_dir (test_data.working_dir.get(), TRUE, &error)) { g_critical ("could not remove directory '%s': %s", - test_data.working_dir, error->message); + test_data.working_dir.get(), error->message); g_error_free (error); error = NULL; } diff --git a/moo/moopython/moopython-utils.h b/moo/moopython/moopython-utils.h index 98017b44..9e5673b8 100644 --- a/moo/moopython/moopython-utils.h +++ b/moo/moopython/moopython-utils.h @@ -67,7 +67,7 @@ void moo_python_remove_path (const char *dir); #define return_Int(v) return PyInt_FromLong (v) #ifdef __cplusplus -const nullptr_t moo_nullptr = nullptr; +const std::nullptr_t moo_nullptr = nullptr; #else #define moo_nullptr NULL #endif diff --git a/moo/mooutils/mooutils-fs.cpp b/moo/mooutils/mooutils-fs.cpp index e2bb7a29..177eb79e 100644 --- a/moo/mooutils/mooutils-fs.cpp +++ b/moo/mooutils/mooutils-fs.cpp @@ -1245,8 +1245,10 @@ _moo_glob_match_simple (const char *pattern, if ((gl = _moo_glob_new (pattern))) result = _moo_glob_match (gl, filename); +#if 0 if (result && 0) _moo_message ("'%s' matched '%s'", filename, pattern); +#endif _moo_glob_free (gl); return result;