| 1216 | |
| 1217 | #ifndef AS_NO_COMPILER |
| 1218 | asCObjectProperty *asCBuilder::GetObjectProperty(asCDataType &obj, const char *prop) |
| 1219 | { |
| 1220 | asASSERT(CastToObjectType(obj.GetTypeInfo()) != 0); |
| 1221 | |
| 1222 | // TODO: optimize: Improve linear search |
| 1223 | asCArray<asCObjectProperty *> &props = CastToObjectType(obj.GetTypeInfo())->properties; |
| 1224 | for( asUINT n = 0; n < props.GetLength(); n++ ) |
| 1225 | { |
| 1226 | if( props[n]->name == prop ) |
| 1227 | { |
| 1228 | if( module->m_accessMask & props[n]->accessMask ) |
| 1229 | return props[n]; |
| 1230 | else |
| 1231 | return 0; |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | return 0; |
| 1236 | } |
| 1237 | #endif |
| 1238 | |
| 1239 | bool asCBuilder::DoesGlobalPropertyExist(const char *prop, asSNameSpace *ns, asCGlobalProperty **outProp, sGlobalVariableDescription **outDesc, bool *isAppProp) |
no test coverage detected