Overview
Artifact ID: | a708691004a13bdf3c53320ce35d4c11cbde405dc66e897533ba8efa858ae594 |
---|---|
Ticket: | 067306a206168ccb29a47f1944b3f7c3ff419e21
Aqua: use isEqualToString: to check appearance names |
User & Date: | marc_culler 2025-08-15 21:39:13 |
Changes
- icomment:
NSAppearanceName is a "Type Alias" for NSString, and the name property of NSAppearance is of type NSAppearanceName. i.e. the documentation says: Type Alias NSAppearanceName typedef NSString * NSAppearanceName; My understanding is that when Apple does this sort of thing they use singleton NSString objects. So all NSAppearance objects with name NSAppearanceNameAqua actually do use equal pointers for their name property. It would make sense to do that, in order to make equality testing faster, given that there are only a few possibilities for a "System Appearance Name". However I can not find any explicit statement guaranteeing that the System Appearance Names used for the name property are actually singletons. So I think the current code works, but that your suggestion would be safer in some sense.
- login: "marc_culler"
- mimetype: "text/plain"
- username: "Marc Culler"