douban/rexxar-ios

没看懂registerRXRProtocolClass里这么写的意思

Closed this issue · 2 comments

  • (void)_frd_setCount:(NSInteger)count forRegisteredClass:(Class)clazz
    {
    NSString *key = NSStringFromClass(clazz);
    NSMutableDictionary *mutDict = [sRegisteredClassCounter mutableCopy];
    if (key) {
    if (!mutDict) {
    mutDict = [NSMutableDictionary dictionary];
    }
    mutDict[key] = @(count);
    }
    }
+ (void)_frd_setCount:(NSInteger)count forRegisteredClass:(Class)clazz
{
  NSString *key = NSStringFromClass(clazz);
  NSMutableDictionary *mutDict = [sRegisteredClassCounter mutableCopy];
  if (key) {
    if (!mutDict) {
      mutDict = [NSMutableDictionary dictionary];
    }
    mutDict[key] = @(count);
  }
}

@daydayfree bug 了吧?
少了

sRegisteredClassCounter = mutDict;

@bigyelow 对的,逻辑有问题