lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 97b7b71 5/6: Simplify compiler test by using


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 97b7b71 5/6: Simplify compiler test by using LMI_GCC
Date: Fri, 16 Apr 2021 18:12:50 -0400 (EDT)

branch: master
commit 97b7b71edd0f45ef9a6256c8a9eca73fa45ca4dc
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Simplify compiler test by using LMI_GCC
    
    Remove the unnecessary test for __clang__ and just check LMI_GCC
    instead, which is simpler but has exactly the same effect.
    
    No real changes.
---
 wx_utility.hpp | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/wx_utility.hpp b/wx_utility.hpp
index f924815..edd89b6 100644
--- a/wx_utility.hpp
+++ b/wx_utility.hpp
@@ -46,27 +46,21 @@ class jdn_t;
 /// (C++98 5.4), which is inherently unsafe. Its sole virtue is that
 /// it is easily searched for.
 
-#if defined __clang__
-#   pragma clang diagnostic push
-// Commented out--clang doesn't seem to have this diagnostic:
-// #   pragma clang diagnostic ignored "-Wcast-function-type"
-#elif defined __GNUC__
+#if defined LMI_GCC
 #   pragma GCC diagnostic push
 #   if 8 <= __GNUC__
 #       pragma GCC diagnostic ignored "-Wcast-function-type"
 #   endif // 8 <= __GNUC__
 #   pragma GCC diagnostic ignored "-Wold-style-cast"
-#endif // defined __GNUC__
+#endif // defined LMI_GCC
 template<typename To, typename From>
 To c_cast(From z)
 {
     return (To)(z);
 }
-#if defined __clang__
-#   pragma clang diagnostic pop
-#elif defined __GNUC__
+#if defined LMI_GCC
 #   pragma GCC diagnostic pop
-#endif // defined __GNUC__
+#endif // defined LMI_GCC
 
 /// Encapsulate wx clipboard.
 ///



reply via email to

[Prev in Thread] Current Thread [Next in Thread]