* Convert the name of a unit to the type value of that unit, or * UNIT_INVALID if not found. */
| 335 | * UNIT_INVALID if not found. |
| 336 | */ |
| 337 | uint8 Unit_StringToType(const char *name) |
| 338 | { |
| 339 | uint8 type; |
| 340 | if (name == NULL) return UNIT_INVALID; |
| 341 | |
| 342 | for (type = 0; type < UNIT_MAX; type++) { |
| 343 | if (strcasecmp(g_table_unitInfo[type].o.name, name) == 0) return type; |
| 344 | } |
| 345 | |
| 346 | return UNIT_INVALID; |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * Convert the name of an action to the type value of that action, or |
no outgoing calls
no test coverage detected