I have been using Objective C for quite a few years but I didn't know @ sign can be used like this (line 6 inside the for loop):
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeInteger:mti forKey:@"mti"];
NSMutableArray *arr = [NSMutableArray arrayWithCapacity:N];
for (int i = 0; i < N; i++)
[arr addObject:@(mt[i])];
[coder encodeObject:arr forKey:@"mt"];
}
What does it mean? surprisingly I can remove it and the compiler does not complain and the code looks like working fine?!
This is part of MTRandom https://github.com/preble/MTRandom/blob/master/MTRandom/MTRandom.m#L115