Configure clang-tidy CI check (#1028)

This commit is contained in:
Siarhei Fedartsou
2023-04-20 09:57:25 +02:00
committed by GitHub
parent f03deb7032
commit 2a7a6f01a2
27 changed files with 200 additions and 31 deletions

View File

@@ -90,7 +90,7 @@ public:
auto &allocator = doc.GetAllocator();
std::map<std::string, std::string> values;
auto db = mapbox::sqlite::Database::open(path.c_str(), mapbox::sqlite::ReadOnly);
auto db = mapbox::sqlite::Database::open(path, mapbox::sqlite::ReadOnly);
mapbox::sqlite::Statement meta(db, "SELECT * from metadata");
for (mapbox::sqlite::Query q(meta); q.run();) {
@@ -268,7 +268,7 @@ private:
return ptr->second;
};
auto ptr2 = db_cache.insert(std::pair<std::string, mapbox::sqlite::Database>(path, mapbox::sqlite::Database::open(path.c_str(), mapbox::sqlite::ReadOnly)));
auto ptr2 = db_cache.insert(std::pair<std::string, mapbox::sqlite::Database>(path, mapbox::sqlite::Database::open(path, mapbox::sqlite::ReadOnly)));
return ptr2.first->second;
}

View File

@@ -42,7 +42,7 @@ std::u16string applyArabicShaping(const std::u16string& input) {
std::u16string outputText(outputLength, 0);
u_shapeArabic(mbgl::utf16char_cast<const UChar*>(input.c_str()), static_cast<int32_t>(input.size()), mbgl::utf16char_cast<UChar*>(&outputText[0]), outputLength,
u_shapeArabic(mbgl::utf16char_cast<const UChar*>(input.c_str()), static_cast<int32_t>(input.size()), mbgl::utf16char_cast<UChar*>(outputText.data()), outputLength,
(U_SHAPE_LETTERS_SHAPE & U_SHAPE_LETTERS_MASK) |
(U_SHAPE_TEXT_DIRECTION_LOGICAL & U_SHAPE_TEXT_DIRECTION_MASK),
&errorCode);
@@ -191,7 +191,7 @@ std::u16string BiDi::writeReverse(const std::u16string& input, std::size_t logic
int32_t outputLength =
ubidi_writeReverse(mbgl::utf16char_cast<const UChar*>(&input[logicalStart]),
logicalLength,
mbgl::utf16char_cast<UChar*>(&outputText[0]),
mbgl::utf16char_cast<UChar*>(outputText.data()),
logicalLength + 1, // Extra room for null terminator, although we don't really need to have ICU write it for us
UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS,
&errorCode);
@@ -223,7 +223,7 @@ std::u16string BiDi::getLine(std::size_t start, std::size_t end) {
// UBIDI_REMOVE_BIDI_CONTROLS: Now that all the lines are set, remove control characters so that
// they don't show up on screen (some fonts have glyphs representing them)
int32_t finalLength = ubidi_writeReordered(impl->bidiLine,
mbgl::utf16char_cast<UChar*>(&outputText[0]),
mbgl::utf16char_cast<UChar*>(outputText.data()),
outputLength,
UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS,
&errorCode);