+string bad_route::get_message(RouteValidityMask valid)
+{
+ const char *reasons[3];
+ unsigned i = 0;
+ if(!(valid&1))
+ reasons[i++] = "unlinked";
+ else if(!(valid&2))
+ reasons[i++] = "branching";
+ else if(!(valid&4))
+ reasons[i++] = "not smooth";
+ return join(reasons, reasons+i, ", ");
+}
+
+