cd13a57256
> EBOOKDocument.cpp:150:37: error: invalid bitwise operation between different enumeration types ('libebook::EBOOKHTMLToken::(unnamed enum at ./EBOOKHTMLToken.h:21:1)' and 'libebook::EBOOKHTMLToken::Namespace')
> 150 | if ((EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri))
> | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
etc. as reported now with --with-latest-c++ (i.e., in C++26 mode) by Clang 18
trunk since
<1cbd52f791
>
"[Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on
Enumerations (#73105)"
Change-Id: I799932d0dffec5e9345f29e14a2ee3f9a2add133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160551
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
17 lines
1.1 KiB
Diff
17 lines
1.1 KiB
Diff
--- src/lib/EBOOKDocument.cpp
|
|
+++ src/lib/EBOOKDocument.cpp
|
|
@@ -147,11 +147,11 @@
|
|
{
|
|
const char *const name = char_cast(xmlTextReaderConstLocalName(reader.get()));
|
|
const char *const uri = char_cast(xmlTextReaderConstNamespaceUri(reader.get()));
|
|
- if ((EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri))
|
|
+ if ((+EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri))
|
|
type = EBOOKDocument::TYPE_XHTML;
|
|
- else if ((EPubToken::container | EPubToken::NS_container) == getEPubTokenId(name, uri))
|
|
+ else if ((+EPubToken::container | EPubToken::NS_container) == getEPubTokenId(name, uri))
|
|
type = EBOOKDocument::TYPE_EPUB;
|
|
- else if ((EBOOKOPFToken::package | EBOOKOPFToken::NS_opf) == getOPFTokenId(name, uri))
|
|
+ else if ((+EBOOKOPFToken::package | EBOOKOPFToken::NS_opf) == getOPFTokenId(name, uri))
|
|
type = EBOOKDocument::TYPE_EPUB;
|
|
else if (EBOOKOPFToken::package == getOPFTokenId(name, uri))
|
|
type = EBOOKDocument::TYPE_OPENEBOOK;
|