Codechange: Use functor for Kdtree's XYFunc. (#13074)
commitfc8685d618dd8d8e031943dd1cecce862971964b
authorPeter Nelson <peter1138@openttd.org>
Tue, 19 Nov 2024 20:29:56 +0000 (19 20:29 +0000)
committerGitHub <noreply@github.com>
Tue, 19 Nov 2024 20:29:56 +0000 (19 20:29 +0000)
tree0ee5bf73dadb2ef3a6dd687e98e01129c7eb1f65
parent369ea29e1edf3bfa982ca904c79972787750f4e9
Codechange: Use functor for Kdtree's XYFunc. (#13074)

Kdtree uses a function pointer and incorrectly calls it a functor. The function pointer needs to be passed on instantiaton.

Instead, use an actual functor. This simplifies instantiation.
src/core/kdtree.hpp
src/station.cpp
src/station_kdtree.h
src/town_cmd.cpp
src/town_gui.cpp
src/town_kdtree.h
src/viewport.cpp
src/viewport_kdtree.h