* Check whether the name is unique amongst the waypoints. * @param name The name to check. * @return True iff the name is unique. */
| 567 | * @return True iff the name is unique. |
| 568 | */ |
| 569 | static 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. |
no test coverage detected