| 240 | } |
| 241 | |
| 242 | String getUniqueName(const char* name, NameCmpFunc isNameUnique, const Vector<String>& names, void* arg1=0, void* arg2=0) |
| 243 | { |
| 244 | const S32 MAX_ITERATIONS = 0x10000; // maximum of 4 characters (A-P) will be appended |
| 245 | |
| 246 | String suffix; |
| 247 | for (S32 i = 0; i < MAX_ITERATIONS; i++) |
| 248 | { |
| 249 | // Generate a suffix using the first 16 characters of the alphabet |
| 250 | suffix.clear(); |
| 251 | for (S32 value = i; value != 0; value >>= 4) |
| 252 | suffix = suffix + (char)('A' + (value & 0xF)); |
| 253 | |
| 254 | String uname = name + suffix; |
| 255 | if (isNameUnique(uname, names, arg1, arg2)) |
| 256 | return uname; |
| 257 | } |
| 258 | return name; |
| 259 | } |
| 260 | |
| 261 | void TSShapeLoader::recurseSubshape(AppNode* appNode, S32 parentIndex, bool recurseChildren) |
| 262 | { |
no test coverage detected