external/libebook: operation between different enumeration types
> 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>
This commit is contained in:
parent
fe99cac649
commit
cd13a57256
2 changed files with 18 additions and 0 deletions
|
@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
|
|||
$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
|
||||
external/libebook/libebook-no-icu-boolean.patch.1 \
|
||||
external/libebook/include.patch \
|
||||
external/libebook/enumarith.patch \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
17
external/libebook/enumarith.patch
vendored
Normal file
17
external/libebook/enumarith.patch
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- 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;
|
Loading…
Reference in a new issue