Clean up code for class NSCustomObject5.

This commit is contained in:
fredkiefer 2020-01-01 13:46:53 +01:00
parent 8b506e12b7
commit 0420155566

View file

@ -79,25 +79,19 @@ static NSString *ApplicationClass = nil;
if (self)
{
_userLabel = [coder decodeObjectForKey: @"userLabel"];
if (_className)
// If we've not set the general application class yet...
if (_className && (ApplicationClass == nil) &&
([NSClassFromString(_className) isKindOfClass: [NSApplication class]]))
{
// If we've not set the general application class yet...
if (([NSClassFromString(_className) isKindOfClass: [NSApplication class]]) &&
(ApplicationClass == nil))
{
@synchronized([self class])
{
ASSIGNCOPY(ApplicationClass, _className);
}
}
ASSIGNCOPY(ApplicationClass, _className);
}
// Override thie one type...
_userLabel = [coder decodeObjectForKey: @"userLabel"];
// Override this one type...
if (_userLabel)
{
if ([@"Application" isEqualToString:_userLabel])
if ([@"Application" isEqualToString: _userLabel])
{
if (ApplicationClass == nil)
ASSIGN(_className, @"NSApplication");