Skip to content

Commit

Permalink
misc-include-cleaner for every file
Browse files Browse the repository at this point in the history
  • Loading branch information
azrogers committed Dec 17, 2024
1 parent 89b00e2 commit 1e2e47a
Show file tree
Hide file tree
Showing 276 changed files with 2,996 additions and 385 deletions.
165 changes: 83 additions & 82 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,89 @@ Checks:
- "-*"
- "misc-include-cleaner"
- "bugprone-argument-comment"
- "bugprone-assert-side-effect"
- "bugprone-assignment-in-if-condition"
- "bugprone-bad-signal-to-kill-thread"
- "bugprone-bool-pointer-implicit-conversion"
- "bugprone-branch-clone"
- "bugprone-casting-through-void"
- "bugprone-chained-comparison"
- "bugprone-compare-pointer-to-member-virtual-function"
- "bugprone-copy-constructor-init"
- "bugprone-crtp-constructor-accessibility"
- "bugprone-dangling-handle"
- "bugprone-dynamic-static-initializers"
- "-bugprone-easily-swappable-parameters"
- "bugprone-empty-catch"
- "bugprone-exception-escape"
- "bugprone-fold-init-type"
- "bugprone-forward-declaration-namespace"
- "bugprone-forwarding-reference-overload"
- "bugprone-implicit-widening-of-multiplication-result"
- "bugprone-inaccurate-erase"
- "bugprone-inc-dec-in-conditions"
- "bugprone-incorrect-enable-if"
- "bugprone-incorrect-roundings"
- "bugprone-infinite-loop"
- "bugprone-unhandled-self-assignment"
- "bugprone-unchecked-optional-access"
#- "bugprone-assert-side-effect"
#- "bugprone-assignment-in-if-condition"
#- "bugprone-bad-signal-to-kill-thread"
#- "bugprone-bool-pointer-implicit-conversion"
#- "bugprone-branch-clone"
#- "bugprone-casting-through-void"
#- "bugprone-chained-comparison"
#- "bugprone-compare-pointer-to-member-virtual-function"
#- "bugprone-copy-constructor-init"
#- "bugprone-crtp-constructor-accessibility"
#- "bugprone-dangling-handle"
#- "bugprone-dynamic-static-initializers"
#- "-bugprone-easily-swappable-parameters"
#- "bugprone-empty-catch"
#- "bugprone-exception-escape"
#- "bugprone-fold-init-type"
#- "bugprone-forward-declaration-namespace"
#- "bugprone-forwarding-reference-overload"
#- "bugprone-implicit-widening-of-multiplication-result"
#- "bugprone-inaccurate-erase"
#- "bugprone-inc-dec-in-conditions"
#- "bugprone-incorrect-enable-if"
#- "bugprone-incorrect-roundings"
#- "bugprone-infinite-loop"
#- "bugprone-unhandled-self-assignment"
#- "bugprone-unchecked-optional-access"

- "bugprone-integer-division"
- "bugprone-lambda-function-name"
- "bugprone-macro-parentheses"
- "bugprone-macro-repeated-side-effects"
- "bugprone-misplaced-operator-in-strlen-in-alloc"
- "bugprone-misplaced-pointer-arithmetic-in-alloc"
- "bugprone-misplaced-widening-cast"
- "bugprone-move-forwarding-reference"
- "bugprone-multi-level-implicit-pointer-conversion"
- "bugprone-multiple-new-in-one-expression"
- "bugprone-multiple-statement-macro"
- "bugprone-no-escape"
- "bugprone-non-zero-enum-to-bool-conversion"
- "bugprone-not-null-terminated-result"
- "bugprone-optional-value-conversion"
- "bugprone-parent-virtual-call"
- "bugprone-pointer-arithmetic-on-polymorphic-object"
- "bugprone-posix-return"
- "bugprone-redundant-branch-condition"
- "bugprone-reserved-identifier"
- "bugprone-return-const-ref-from-parameter"
- "bugprone-shared-ptr-array-mismatch"
- "bugprone-signal-handler"
- "bugprone-signed-char-misuse"
- "bugprone-sizeof-container"
- "bugprone-sizeof-expression"
- "bugprone-spuriously-wake-up-functions"
- "bugprone-standalone-empty"
- "bugprone-string-constructor"
- "bugprone-string-integer-assignment"
- "bugprone-string-literal-with-embedded-nul"
- "bugprone-stringview-nullptr"
- "bugprone-suspicious-enum-usage"
- "bugprone-suspicious-include"
- "bugprone-suspicious-memory-comparison"
- "bugprone-suspicious-memset-usage"
- "bugprone-suspicious-missing-comma"
- "bugprone-suspicious-realloc-usage"
- "bugprone-suspicious-semicolon"
- "bugprone-suspicious-string-compare"
- "bugprone-suspicious-stringview-data-usage"
- "bugprone-swapped-arguments"
- "bugprone-switch-missing-default-case"
- "bugprone-terminating-continue"
- "bugprone-throw-keyword-missing"
- "bugprone-too-small-loop-variable"
- "bugprone-undefined-memory-manipulation"
- "bugprone-undelegated-constructor"
- "bugprone-unhandled-exception-at-new"
- "bugprone-unique-ptr-array-mismatch"
- "bugprone-unsafe-functions"
- "bugprone-unused-local-non-trivial-variable"
- "bugprone-unused-raii"
- "bugprone-unused-return-value"
- "bugprone-use-after-move"
- "bugprone-virtual-near-miss"
#- "bugprone-integer-division"
#- "bugprone-lambda-function-name"
#- "bugprone-macro-parentheses"
#- "bugprone-macro-repeated-side-effects"
#- "bugprone-misplaced-operator-in-strlen-in-alloc"
#- "bugprone-misplaced-pointer-arithmetic-in-alloc"
#- "bugprone-misplaced-widening-cast"
#- "bugprone-move-forwarding-reference"
#- "bugprone-multi-level-implicit-pointer-conversion"
#- "bugprone-multiple-new-in-one-expression"
#- "bugprone-multiple-statement-macro"
#- "bugprone-no-escape"
#- "bugprone-non-zero-enum-to-bool-conversion"
#- "bugprone-not-null-terminated-result"
#- "bugprone-optional-value-conversion"
#- "bugprone-parent-virtual-call"
#- "bugprone-pointer-arithmetic-on-polymorphic-object"
#- "bugprone-posix-return"
#- "bugprone-redundant-branch-condition"
#- "bugprone-reserved-identifier"
#- "bugprone-return-const-ref-from-parameter"
#- "bugprone-shared-ptr-array-mismatch"
#- "bugprone-signal-handler"
#- "bugprone-signed-char-misuse"
#- "bugprone-sizeof-container"
#- "bugprone-sizeof-expression"
#- "bugprone-spuriously-wake-up-functions"
#- "bugprone-standalone-empty"
#- "bugprone-string-constructor"
#- "bugprone-string-integer-assignment"
#- "bugprone-string-literal-with-embedded-nul"
#- "bugprone-stringview-nullptr"
#- "bugprone-suspicious-enum-usage"
#- "bugprone-suspicious-include"
#- "bugprone-suspicious-memory-comparison"
#- "bugprone-suspicious-memset-usage"
#- "bugprone-suspicious-missing-comma"
#- "bugprone-suspicious-realloc-usage"
#- "bugprone-suspicious-semicolon"
#- "bugprone-suspicious-string-compare"
#- "bugprone-suspicious-stringview-data-usage"
#- "bugprone-swapped-arguments"
#- "bugprone-switch-missing-default-case"
#- "bugprone-terminating-continue"
#- "bugprone-throw-keyword-missing"
#- "bugprone-too-small-loop-variable"
#- "bugprone-undefined-memory-manipulation"
#- "bugprone-undelegated-constructor"
#- "bugprone-unhandled-exception-at-new"
#- "bugprone-unique-ptr-array-mismatch"
#- "bugprone-unsafe-functions"
#- "bugprone-unused-local-non-trivial-variable"
#- "bugprone-unused-raii"
#- "bugprone-unused-return-value"
#- "bugprone-use-after-move"
#- "bugprone-virtual-near-miss"
- "-readability-redundant-member-init"

#WarningsAsErrors: "*"
Expand All @@ -102,4 +102,5 @@ CheckOptions:
value: ".*cesium-async\\+\\+\\.h"
HeaderFilterRegex: ".*"
HeaderFileExtensions: ["h"]
ExcludeHeaderFilterRegex: ".*\\.ezvcpkg\/.*"
ImplementationFileExtensions: ["cpp"]
10 changes: 10 additions & 0 deletions Cesium3DTiles/src/MetadataQuery.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#include "Cesium3DTiles/Class.h"
#include "Cesium3DTiles/ClassProperty.h"
#include "Cesium3DTiles/MetadataEntity.h"
#include "Cesium3DTiles/Schema.h"
#include "CesiumUtility/JsonValue.h"

#include <Cesium3DTiles/MetadataQuery.h>

#include <optional>
#include <string>
#include <utility>

namespace Cesium3DTiles {

std::optional<FoundMetadataProperty>
Expand Down
9 changes: 8 additions & 1 deletion Cesium3DTiles/test/TestMetadataQuery.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#include "Cesium3DTiles/Class.h"
#include "Cesium3DTiles/ClassProperty.h"
#include "Cesium3DTiles/MetadataEntity.h"
#include "Cesium3DTiles/Schema.h"
#include "CesiumUtility/JsonValue.h"

#include <Cesium3DTiles/MetadataQuery.h>

#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include <optional>

using namespace Cesium3DTiles;
using namespace CesiumUtility;

Expand Down
12 changes: 11 additions & 1 deletion Cesium3DTilesContent/src/B3dmToGltfConverter.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
#include "BatchTableToGltfStructuralMetadata.h"
#include "Cesium3DTilesContent/GltfConverterResult.h"
#include "CesiumAsync/Future.h"
#include "CesiumGltfReader/GltfReader.h"

#include <Cesium3DTilesContent/B3dmToGltfConverter.h>
#include <Cesium3DTilesContent/BinaryToGltfConverter.h>
#include <Cesium3DTilesContent/GltfConverters.h>
#include <CesiumGltf/ExtensionCesiumRTC.h>
#include <CesiumUtility/Log.h>

#include <fmt/format.h>
#include <rapidjson/document.h>

#include <cstddef>
#include <cstdint>
#include <span>
#include <utility>

namespace Cesium3DTilesContent {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
#include <CesiumUtility/Assert.h>

#include <glm/common.hpp>
#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>

#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

using namespace Cesium3DTilesContent::CesiumImpl;

Expand Down
28 changes: 26 additions & 2 deletions Cesium3DTilesContent/src/BatchTableToGltfStructuralMetadata.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
#include "BatchTableToGltfStructuralMetadata.h"

#include "BatchTableHierarchyPropertyValues.h"
#include "CesiumUtility/ErrorList.h"
#include "CesiumUtility/JsonValue.h"

#include <CesiumGltf/Buffer.h>
#include <CesiumGltf/BufferView.h>
#include <CesiumGltf/Class.h>
#include <CesiumGltf/ClassProperty.h>
#include <CesiumGltf/ExtensionExtMeshFeatures.h>
#include <CesiumGltf/ExtensionKhrDracoMeshCompression.h>
#include <CesiumGltf/ExtensionModelExtStructuralMetadata.h>
#include <CesiumGltf/FeatureId.h>
#include <CesiumGltf/Mesh.h>
#include <CesiumGltf/MeshPrimitive.h>
#include <CesiumGltf/Model.h>
#include <CesiumGltf/PropertyTable.h>
#include <CesiumGltf/PropertyTableProperty.h>
#include <CesiumGltf/PropertyType.h>
#include <CesiumGltf/PropertyTypeTraits.h>
#include <CesiumGltf/Schema.h>
#include <CesiumUtility/Assert.h>
#include <CesiumUtility/Log.h>

#include <glm/glm.hpp>
#include <fmt/format.h>
#include <glm/common.hpp>
#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>

#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <map>
#include <optional>
#include <span>
#include <string>
#include <type_traits>
#include <unordered_set>
#include <utility>
#include <variant>
#include <vector>

using namespace CesiumGltf;
using namespace Cesium3DTilesContent::CesiumImpl;
Expand Down
10 changes: 10 additions & 0 deletions Cesium3DTilesContent/src/BinaryToGltfConverter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#include "Cesium3DTilesContent/GltfConverterResult.h"
#include "CesiumAsync/Future.h"
#include "CesiumGeometry/Axis.h"
#include "CesiumGltfReader/GltfReader.h"

#include <Cesium3DTilesContent/BinaryToGltfConverter.h>
#include <Cesium3DTilesContent/GltfConverters.h>

#include <cstddef>
#include <span>
#include <type_traits>
#include <utility>

namespace Cesium3DTilesContent {
CesiumGltfReader::GltfReader BinaryToGltfConverter::_gltfReader;

Expand Down
12 changes: 11 additions & 1 deletion Cesium3DTilesContent/src/CmptToGltfConverter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#include "Cesium3DTilesContent/GltfConverterResult.h"
#include "CesiumAsync/Future.h"
#include "CesiumGltfReader/GltfReader.h"

#include <Cesium3DTilesContent/CmptToGltfConverter.h>
#include <Cesium3DTilesContent/GltfConverters.h>

#include <spdlog/fmt/fmt.h>
#include <fmt/format.h>

#include <cstddef>
#include <cstdint>
#include <span>
#include <utility>
#include <vector>

namespace Cesium3DTilesContent {
namespace {
Expand Down
17 changes: 13 additions & 4 deletions Cesium3DTilesContent/src/GltfConverterUtility.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
#include "CesiumUtility/ErrorList.h"

#include <Cesium3DTilesContent/GltfConverterUtility.h>
#include <CesiumGltf/Accessor.h>
#include <CesiumGltf/Buffer.h>
#include <CesiumGltf/BufferView.h>
#include <CesiumGltf/Model.h>
#include <CesiumGltfContent/GltfUtilities.h>
#include <CesiumUtility/Uri.h>

#include <glm/gtc/matrix_transform.hpp>
#include <glm/ext/matrix_double4x4.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/ext/vector_double3.hpp>
#include <glm/matrix.hpp>
#include <rapidjson/document.h>
#include <rapidjson/rapidjson.h>

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <optional>
#include <string>
#include <utility>
#include <vector>

namespace Cesium3DTilesContent {
namespace GltfConverterUtility {
Expand Down
21 changes: 20 additions & 1 deletion Cesium3DTilesContent/src/GltfConverters.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
#include "Cesium3DTilesContent/GltfConverterResult.h"
#include "CesiumAsync/Future.h"
#include "CesiumAsync/IAssetRequest.h"
#include "CesiumGltfReader/GltfReader.h"
#include "CesiumUtility/ErrorList.h"

#include <Cesium3DTilesContent/GltfConverters.h>
#include <CesiumAsync/IAssetResponse.h>
#include <CesiumUtility/Uri.h>

#include <spdlog/spdlog.h>
#include <fmt/format.h>

#include <algorithm>
#include <cctype>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>

using namespace CesiumUtility;

Expand Down
Loading

0 comments on commit 1e2e47a

Please sign in to comment.