From 64e03b9c585c2d5b82fd634f1430ff4053bbc95a Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Thu, 28 Jul 2022 10:31:55 +0800 Subject: [PATCH] Address Knits. Signed-off-by: Arjo Chakravarty --- include/gz/math/VolumetricGridLookupField.hh | 4 ++-- src/VolumetricGridLookupField_TEST.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gz/math/VolumetricGridLookupField.hh b/include/gz/math/VolumetricGridLookupField.hh index 1c167fe51..0449497f7 100644 --- a/include/gz/math/VolumetricGridLookupField.hh +++ b/include/gz/math/VolumetricGridLookupField.hh @@ -153,8 +153,8 @@ namespace gz assert(_indices.size() == _cloud.size()); // NOTE: This part of the code assumes an exact grid of points. // The grid may be distorted or the stride between different points - // may not be the same, but fundamentally the data is structured still - // forms a grid-like structure. It keeps track of the axis indices for + // may not be the same, but fundamentally the data is structured in + // a grid-like structure. It keeps track of the axis indices for // each point in the grid. for(auto pt : _cloud) { diff --git a/src/VolumetricGridLookupField_TEST.cc b/src/VolumetricGridLookupField_TEST.cc index 549452fba..7f6798784 100644 --- a/src/VolumetricGridLookupField_TEST.cc +++ b/src/VolumetricGridLookupField_TEST.cc @@ -61,10 +61,10 @@ TEST(VolumetricGridLookupField, CustomIndices) for(double z = 0; z < 300; z += stride_z) { cloud.emplace_back(x, y, z); - indices.push_back(0); } } } + indices.resize(cloud.size(), 0); VolumetricGridLookupField scalarIndex(cloud, indices); auto val = scalarIndex.GetInterpolators(cloud[0]); ASSERT_EQ(val.size(), 1UL);