MicroPather icon indicating copy to clipboard operation
MicroPather copied to clipboard

Rename MicroPather::Reset()

Open randomMesh opened this issue 5 years ago • 0 comments

When using MicroPather in a modern application using std::unique_ptr, the Reset method could easily be confused with the reset method of the smart pointer.

std::unique_ptr<micropather::MicroPather> pather;

// costs between states changed
pather->Reset();

// delete the pointer explicitly
pather.reset();

I therefore suggest to rename the Reset method to StateCostChanged or similar. You should keep Reset and use it as a wrapper for the new method in order to keep backwards compatibility, though.

randomMesh avatar Jan 15 '21 20:01 randomMesh