| 248 | |
| 249 | template<std::size_t SIZE> |
| 250 | bool MipsGetRegister(const char* source, int& RetLen, MipsRegisterInfo& Result, const std::array<tMipsRegister, SIZE>& RegisterList) |
| 251 | { |
| 252 | for (const auto& reg : RegisterList) { |
| 253 | if(strEquals(reg.name, source) && isValidRegisterTrail(source, strlen(reg.name))) |
| 254 | { |
| 255 | std::strncpy(Result.name, source, strlen(reg.name)); |
| 256 | Result.num = reg.num; |
| 257 | RetLen = static_cast<int>(strlen(reg.name)); // grrr... should be unsigned!! |
| 258 | return true; |
| 259 | } |
| 260 | } |
| 261 | return false; |
| 262 | } |
| 263 | |
| 264 | template<std::size_t SIZE> |
| 265 | int MipsGetRegister(const char* source, int& RetLen, const std::array<tMipsRegister, SIZE>& RegisterList) |
no test coverage detected