[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.
///
- [lmi-commits] [lmi] master updated (87a7956 -> 15ca198), Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master ce480d0 1/6: Revert "Resolve issue noted 20131011T1213Z", Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master a5716af 3/6: Define LMI_GCC symbol and use it for gcc-specific parts, Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master b36b8c3 2/6: Add and use a modal Nx UL commutation function, Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master 1192bc5 4/6: Don't interleave diagnostic push/pop pragmas for clang, Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master 15ca198 6/6: Define and use LMI_CLANG in addition to LMI_GCC, Greg Chicares, 2021/04/16
- [lmi-commits] [lmi] master 97b7b71 5/6: Simplify compiler test by using LMI_GCC,
Greg Chicares <=