Skip to content

Commit

Permalink
unblockify
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed May 29, 2014
1 parent 2c84d53 commit 732f9a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Realm/RLMObjectSchema.mm
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ +(instancetype)schemaForObjectClass:(Class)objectClass {
// create array of RLMProperties
NSMutableArray *propArray = [NSMutableArray arrayWithCapacity:count];
for (unsigned int i = 0; i < count; i++) {
// Block to test if object class ignores a property
BOOL(^isPropertyIgnoredByClass)(objc_property_t, Class) = ^(objc_property_t property, Class objectClass) {
NSString *propertyName = [NSString stringWithUTF8String:property_getName(property)];
return [[objectClass ignoredProperties] containsObject:propertyName];
};
NSString *propertyName = [NSString stringWithUTF8String:property_getName(props[i])];
BOOL ignored = [[objectClass ignoredProperties] containsObject:propertyName];

if (!isPropertyIgnoredByClass(props[i], objectClass)) {
if (!ignored) { // Don't process ignored properties
RLMProperty *prop = [RLMProperty propertyForObjectProperty:props[i] column:propArray.count];
if (prop) {
[propArray addObject:prop];
Expand Down

0 comments on commit 732f9a5

Please sign in to comment.