MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsUniqueWaypointName

Function IsUniqueWaypointName

src/waypoint_cmd.cpp:569–576  ·  view source on GitHub ↗

* Check whether the name is unique amongst the waypoints. * @param name The name to check. * @return True iff the name is unique. */

Source from the content-addressed store, hash-verified

567 * @return True iff the name is unique.
568 */
569static bool IsUniqueWaypointName(const std::string &name)
570{
571 for (const Waypoint *wp : Waypoint::Iterate()) {
572 if (!wp->name.empty() && wp->name == name) return false;
573 }
574
575 return true;
576}
577
578/**
579 * Rename a waypoint.

Callers 1

CmdRenameWaypointFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected