I'm working with third-party project, which I need to modify. Currently I've met the following strange code:
A function is declared as follows in Obj-C:
@interface CVASPlayer : NSObject
+ (void)optimizeForTheory:(CVGame *)game;
@end
@implementation CVASPlayer
+ (void)optimizeForTheory:(CVGame *)game {
ASGamerParser::optimizeForTheory((Game *)[game getCPPClass]);
}
@end
And it is called from Swift as:
CVASPlayer.optimize(forTheory: game)
The method names doesn't match - optimize
and optimizeForTheory
. How it works? And forTheory
is strangely moved to a parameter name, how is it possible?