Apply just the changes from the MLT branch which aren't really part of that work (#3793)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/util/work_task.hpp>
|
||||
#include <mbgl/util/run_loop.hpp>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user