Skip to content

Commit 2142974

Browse files
committed
insertPointFrom(): remove useless argument
1 parent 7a643da commit 2142974

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

doc/source/doxygen-docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
\page changelog Change Log
22

3+
# Version 2.15.3: UNRELEASED
4+
- Changes in libraries:
5+
- \ref mrpt_maps_grp
6+
- mrpt::maps::CPointsMap::insertPointFrom() removed first argument (sourceMap) since it's now useless using the insertionContext.
7+
38
# Version 2.15.2: Released Nov 19th, 2025
49
- Changes in libraries:
510
- \ref mrpt_maps_grp

libs/maps/include/mrpt/maps/CPointsMap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class CPointsMap :
210210
const auto ctx = this->prepareForInsertPointsFrom(obj);
211211
for (size_t i = 0; i < N; i++)
212212
{
213-
insertPointFrom(obj, i, ctx);
213+
insertPointFrom(i, ctx);
214214
}
215215
}
216216

@@ -883,13 +883,13 @@ class CPointsMap :
883883

884884
/** Prepare efficient data structures for repeated insertion from another point map with
885885
* insertPointFrom() */
886-
InsertCtx prepareForInsertPointsFrom(const CPointsMap& source) const;
886+
[[nodiscard]] InsertCtx prepareForInsertPointsFrom(const CPointsMap& source) const;
887887

888888
/** Generic method to copy *all* applicable point properties from
889889
* one map to another, e.g. timestamp, intensity, etc.
890890
* \note Before calling this in a loop, make sure of calling registerPointFieldsFrom()
891891
*/
892-
void insertPointFrom(const CPointsMap& source, size_t sourcePointIndex, const InsertCtx& ctx)
892+
void insertPointFrom(size_t sourcePointIndex, const InsertCtx& ctx)
893893
{
894894
const size_t i = sourcePointIndex;
895895
insertPointFast((*ctx.xs_src)[i], (*ctx.ys_src)[i], (*ctx.zs_src)[i]);

libs/maps/src/maps/CPointsMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ void CPointsMap::insertAnotherMap(
15391539
if (pt.x != pt.x) continue;
15401540

15411541
// Add to this map:
1542-
this->insertPointFrom(*otherMap, srcIdx, ctx);
1542+
this->insertPointFrom(srcIdx, ctx);
15431543

15441544
// and overwrite the XYZ, if needed:
15451545
if (!identity_tf)

0 commit comments

Comments
 (0)