Skip to content

Commit

Permalink
disable mdformat, tracking: hukkin/mdformat#273
Browse files Browse the repository at this point in the history
  • Loading branch information
CCInc committed Oct 5, 2021
1 parent 113b910 commit e6d865a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 6 additions & 8 deletions cpp/src/hierarchy/key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions python/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions test/reader_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6d865a

Please sign in to comment.