Apply just the changes from the MLT branch which aren't really part of that work (#3793)

This commit is contained in:
Tim Sylvester
2025-09-11 16:39:58 -07:00
committed by GitHub
parent 921251b973
commit bc025fca49
44 changed files with 181 additions and 123 deletions

View File

@@ -10,7 +10,6 @@
#include <cstdint>
#include <cstddef>
#include <memory>
#include <vector>
#include <functional>
#include <optional>

View File

@@ -31,7 +31,7 @@ private:
// unique id used for debugging and profiling purposes
// localID should not be used as unique id because a const buffer pool is managed using IBufferAllocator
// Currently unique IDs for constant buffers are only used when Tracy profiling is enabled
// Currently unique IDs for constant buffers are only used when Tracy profiling is enabled
#ifdef MLN_TRACY_ENABLE
int64_t uniqueDebugId = -1;
#endif

View File

@@ -21,8 +21,8 @@ public:
using Object = std::unordered_map<std::string, expression::Value>;
if (context.formattedSection && context.formattedSection->is<Object>()) {
const auto& section = context.formattedSection->get<Object>();
if (section.find(propertyName) != section.end()) {
return section.at(propertyName);
if (auto hit = section.find(propertyName); hit != section.end()) {
return hit->second;
}
}

View File

@@ -8,6 +8,7 @@ namespace mbgl {
template <typename Enum>
constexpr Enum operator|(Enum a, Enum b) {
static_assert(std::is_enum_v<Enum>, "Enum must be an enum type");
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return Enum(mbgl::underlying_type(a) | mbgl::underlying_type(b));
}

View File

@@ -13,6 +13,7 @@ enum CompressionFormat {
DETECT = 15 + 32
};
bool is_compressed(const std::string&);
std::string compress(const std::string& raw, int windowBits = CompressionFormat::ZLIB);
std::string decompress(const std::string& raw, int windowBits = CompressionFormat::DETECT);

View File

@@ -1,7 +1,6 @@
#pragma once
#include <mbgl/util/work_task.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mutex>