Add clang-format (#1086)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Bart Louwers
2023-05-01 16:57:37 +02:00
committed by GitHub
parent 403a12bd1b
commit 71f6da2722
1018 changed files with 27876 additions and 25862 deletions

View File

@@ -5,7 +5,8 @@
namespace mbgl {
void SourceFeatureState::updateState(const std::optional<std::string>& sourceLayerID, const std::string& featureID,
void SourceFeatureState::updateState(const std::optional<std::string>& sourceLayerID,
const std::string& featureID,
const FeatureState& newState) {
std::string sourceLayer = sourceLayerID.value_or(std::string());
for (const auto& state : newState) {
@@ -15,7 +16,8 @@ void SourceFeatureState::updateState(const std::optional<std::string>& sourceLay
}
}
void SourceFeatureState::getState(FeatureState& result, const std::optional<std::string>& sourceLayerID,
void SourceFeatureState::getState(FeatureState& result,
const std::optional<std::string>& sourceLayerID,
const std::string& featureID) const {
std::string sourceLayer = sourceLayerID.value_or(std::string());
FeatureState current;
@@ -101,7 +103,8 @@ void SourceFeatureState::coalesceChanges(std::vector<RenderTile>& tiles) {
}
}
void SourceFeatureState::removeState(const std::optional<std::string>& sourceLayerID, const std::optional<std::string>& featureID,
void SourceFeatureState::removeState(const std::optional<std::string>& sourceLayerID,
const std::optional<std::string>& featureID,
const std::optional<std::string>& stateKey) {
std::string sourceLayer = sourceLayerID.value_or(std::string());
@@ -115,8 +118,8 @@ void SourceFeatureState::removeState(const std::optional<std::string>& sourceLay
deletedStates[sourceLayer][*featureID][*stateKey] = {};
}
} else if (featureID) {
bool updateInQueue =
(stateChanges.count(sourceLayer) != 0U) && (stateChanges[sourceLayer].count(*featureID) != 0U);
bool updateInQueue = (stateChanges.count(sourceLayer) != 0U) &&
(stateChanges[sourceLayer].count(*featureID) != 0U);
if (updateInQueue) {
for (const auto& changeEntry : stateChanges[sourceLayer][*featureID]) {
deletedStates[sourceLayer][*featureID][changeEntry.first] = {};