diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b1408c7..62e453db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,11 @@ repos: - id: check-yaml name: (YAML) Check syntax -- repo: https://github.com/executablebooks/mdformat - rev: 0.7.10 - hooks: - - id: mdformat - name: (Markdown) Format with mdformat +#- repo: https://github.com/executablebooks/mdformat +# rev: 0.7.10 +# hooks: +# - id: mdformat +# name: (Markdown) Format with mdformat - repo: git://github.com/pocc/pre-commit-hooks rev: v1.3.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 38687eca..024ae9f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Copc` class [1.1.0]: https://github.com/RockRobotic/copc-lib/compare/v1.0...v1.1.0 -[1.3.0]: https://github.com/RockRobotic/copc-lib/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/RockRobotic/copc-lib/compare/v1.1.0...v1.2.0 +[1.3.0]: https://github.com/RockRobotic/copc-lib/compare/v1.2.0...v1.3.0 [Unreleased]: https://github.com/RockRobotic/copc-lib/compare/v1.3.0...HEAD diff --git a/cpp/src/hierarchy/key.cpp b/cpp/src/hierarchy/key.cpp index 792320cc..6633ebb2 100644 --- a/cpp/src/hierarchy/key.cpp +++ b/cpp/src/hierarchy/key.cpp @@ -16,14 +16,12 @@ VoxelKey VoxelKey::Bisect(const uint64_t &direction) const VoxelKey key(*this); ++key.d; - auto step( - [&key, direction](uint8_t i) - { - key.IdAt(i) *= 2; - const bool positive(direction & (((uint64_t)1) << i)); - if (positive) - ++key.IdAt(i); - }); + auto step([&key, direction](uint8_t i) { + key.IdAt(i) *= 2; + const bool positive(direction & (((uint64_t)1) << i)); + if (positive) + ++key.IdAt(i); + }); for (uint8_t i(0); i < 3; ++i) step(i); diff --git a/python/bindings.cpp b/python/bindings.cpp index 7767066d..a55c3697 100644 --- a/python/bindings.cpp +++ b/python/bindings.cpp @@ -129,8 +129,9 @@ PYBIND11_MODULE(copclib, m) "__truediv__", [](const Vector3 &vec, const double &d) { return vec / d; }, py::is_operator()) .def( "__floordiv__", - [](const Vector3 &vec, const double &d) - { return Vector3(std::floor(vec.x / d), std::floor(vec.y / d), std::floor(vec.z / d)); }, + [](const Vector3 &vec, const double &d) { + return Vector3(std::floor(vec.x / d), std::floor(vec.y / d), std::floor(vec.z / d)); + }, py::is_operator()) .def( "__add__", [](const Vector3 &vec, const double &d) { return vec + d; }, py::is_operator()) @@ -239,8 +240,7 @@ PYBIND11_MODULE(copclib, m) using DiffType = ssize_t; using SizeType = size_t; - auto wrap_i = [](DiffType i, SizeType n) - { + auto wrap_i = [](DiffType i, SizeType n) { if (i < 0) i += n; if (i < 0 || (SizeType)i >= n) diff --git a/test/reader_test.cpp b/test/reader_test.cpp index f6a6dedb..ca0c6d55 100644 --- a/test/reader_test.cpp +++ b/test/reader_test.cpp @@ -230,8 +230,7 @@ TEST_CASE("Spatial Query Functions", "[Reader]") // std::ceil(header.max.y), // std::ceil(header.max.z))); // REQUIRE(subset_points.Get().size() == header.point_count); - } - { + } { // Take horizontal 2D box of [200,200] roughly in the middle of the point cloud. auto subset_points = reader.GetPointsWithinBox(Box(637190, 851109, 637390, 851309)); REQUIRE(subset_points.Get().size() == 22902);