From c4392f49d1313fbc159882e993683909ea40f188 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 7 May 2021 12:17:35 +0800 Subject: error.h Avoid exporting class deriving frm std::exception This will avoid having the ABI tied to a particular STL and compiler version, and so will eliminate C4275 compiler warnings when building the code. Also update gerror.m4 so that it will generate code deriving from Glib::Error with the export macro markings with the member functions, so that things continue to build properly --- tools/m4/gerror.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/m4/gerror.m4 b/tools/m4/gerror.m4 index 4dabb037..01036f06 100644 --- a/tools/m4/gerror.m4 +++ b/tools/m4/gerror.m4 @@ -17,7 +17,7 @@ ifelse(`$6',,,`dnl /** $6 */ ')dnl -class $9 __CPPNAME__ : public Glib::Error +class __CPPNAME__ : public Glib::Error { public: /** $7 @@ -27,14 +27,14 @@ public: $4 }; - __CPPNAME__`'(Code error_code, const Glib::ustring& error_message); - explicit __CPPNAME__`'(GError* gobject); - Code code() const; + $9 __CPPNAME__`'(Code error_code, const Glib::ustring& error_message); + $9 explicit __CPPNAME__`'(GError* gobject); + $9 Code code() const; #ifndef DOXYGEN_SHOULD_SKIP_THIS private: - static void throw_func(GError* gobject); + $9 static void throw_func(GError* gobject); friend $9 void wrap_init(); // uses throw_func() -- cgit v1.2.1