[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1cefad6 4/9: Fix LMI_WX_CHILD_DOCUMENT defini
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1cefad6 4/9: Fix LMI_WX_CHILD_DOCUMENT definition to fix g++11 C++20 build |
Date: |
Sat, 23 Oct 2021 18:32:44 -0400 (EDT) |
branch: master
commit 1cefad6a53979a5d7c7c5158678e2ba2a747ea0e
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Fix LMI_WX_CHILD_DOCUMENT definition to fix g++11 C++20 build
Combining elements of two different enums, such as wxDOC_SILENT and
LMI_WX_CHILD_DOCUMENT, is not allowed in C++20 and g++11 warns about it.
Avoid this warning simply by not making LMI_WX_CHILD_DOCUMENT an enum
element at all but long, which is the type actually used by wxWidgets
for the "flags" parameter.
---
illustration_document.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/illustration_document.hpp b/illustration_document.hpp
index 317dd75..be2f22d 100644
--- a/illustration_document.hpp
+++ b/illustration_document.hpp
@@ -40,7 +40,7 @@
/// word. This is brittle, but then again it seems unlikely that
/// anyone will change this aspect of wx.
-enum {LMI_WX_CHILD_DOCUMENT = 8};
+constexpr long LMI_WX_CHILD_DOCUMENT = 8;
class IllustrationView;
class WXDLLIMPEXP_FWD_CORE wxHtmlWindow;
- [lmi-commits] [lmi] master updated (03dc638 -> b0c70e0), Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master bbc5038 2/9: Disable gcc -Wdeprecated-enum-float-conversion, Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master a5db27e 1/9: Recognize gcc and g++ 11 versions in the makefile, Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master d810372 3/9: Trade elegance for simplicity, Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master 33de332 5/9: Prefer 'long int' to 'long', Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master e908d9e 8/9: Don't disable -Wdeprecated-enum-enum-conversion in configure, Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master 1cefad6 4/9: Fix LMI_WX_CHILD_DOCUMENT definition to fix g++11 C++20 build,
Greg Chicares <=
- [lmi-commits] [lmi] master a5de0ea 6/9: Fix gcc11 -Wdeprecated-enum-enum-conversion in test_coding_rules, Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master 97416cf 7/9: Emulate C++23 to_underlying<>(), Greg Chicares, 2021/10/23
- [lmi-commits] [lmi] master b0c70e0 9/9: Update wxWidgets submodule to fix gcc11 -Wshadow warnings, Greg Chicares, 2021/10/23