office-gobmx/external/clucene/patches/enumarith.patch
Stephan Bergmann befc51e1ad external/clucene: operation between different enumeration types
> workdir/UnpackedTarball/clucene/src/core/CLucene/index/FieldsReader.cpp:233:58: error: invalid bitwise operation between different enumeration types ('lucene::document::Field::Store' and 'lucene::document::Field::Index')
>   233 |                         f = _CLNEW LazyField(this, fi->name, Field::STORE_YES | getIndexType(fi, tokenize) | getTermVectorType(fi), length, pointer);
>       |                                                              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~

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: I2d48298bc64e05271ee5c33255d7d57fed6221cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160549
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-11 08:23:47 +01:00

11 lines
582 B
Diff

--- src/core/CLucene/index/FieldsReader.cpp
+++ src/core/CLucene/index/FieldsReader.cpp
@@ -230,7 +230,7 @@
int64_t pointer = fieldsStream->getFilePointer();
//Skip ahead of where we are by the length of what is stored
fieldsStream->skipChars(length);
- f = _CLNEW LazyField(this, fi->name, Field::STORE_YES | getIndexType(fi, tokenize) | getTermVectorType(fi), length, pointer);
+ f = _CLNEW LazyField(this, fi->name, +Field::STORE_YES | getIndexType(fi, tokenize) | getTermVectorType(fi), length, pointer);
f->setOmitNorms(fi->omitNorms);
}
doc.add(*f);