lmi-commits
[Top][All Lists]
Advanced

[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;



reply via email to

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