| 2080 | } |
| 2081 | |
| 2082 | ref<const ReflectionVar> ReflectionType::findMember(std::string_view name) const |
| 2083 | { |
| 2084 | if (auto pStructType = asStructType()) |
| 2085 | { |
| 2086 | size_t fieldIndex = pStructType->getMemberIndex(name); |
| 2087 | if (fieldIndex == ReflectionStructType::kInvalidMemberIndex) |
| 2088 | return nullptr; |
| 2089 | |
| 2090 | return pStructType->getMember(fieldIndex); |
| 2091 | } |
| 2092 | |
| 2093 | return nullptr; |
| 2094 | } |
| 2095 | |
| 2096 | int32_t ReflectionStructType::getMemberIndex(std::string_view name) const |
| 2097 | { |
no test coverage detected