Differences From Artifact [cbc749740e]:
- File src/OFObject.h — part of check-in [166fd50e82] at 2017-10-01 09:28:44 on branch trunk — Nullability fixes for macOS High Sierra (user: js, size: 34967) [annotate] [blame] [check-ins using]
To Artifact [39e5e50197]:
- File
src/OFObject.h
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 35063) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
354 355 356 357 358 359 360 | /*! * @brief Increases the retain count. * * Each time an object is released, the retain count gets decreased and the * object deallocated if it reaches 0. */ | | | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | /*! * @brief Increases the retain count. * * Each time an object is released, the retain count gets decreased and the * object deallocated if it reaches 0. */ - (instancetype)retain; /*! * @brief Returns the retain count. * * @return The retain count */ - (unsigned int)retainCount; |
︙ | ︙ | |||
377 378 379 380 381 382 383 | /*! * @brief Adds the object to the topmost OFAutoreleasePool of the thread's * autorelease pool stack. * * @return The object */ | | | | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | /*! * @brief Adds the object to the topmost OFAutoreleasePool of the thread's * autorelease pool stack. * * @return The object */ - (instancetype)autorelease; /*! * @brief Returns the receiver. * * @return The receiver */ - (instancetype)self; /*! * @brief Returns whether the object is a proxy object. * * @return A boolean whether the object is a proxy object */ - (bool)isProxy; |
︙ | ︙ | |||
467 468 469 470 471 472 473 | * pool for the object. * * This method will never return `nil`, instead, it will throw an * @ref OFAllocFailedException. * * @return The allocated object */ | | | | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | * pool for the object. * * This method will never return `nil`, instead, it will throw an * @ref OFAllocFailedException. * * @return The allocated object */ + (instancetype)alloc; /*! * @brief Allocates memory for a new instance and calls @ref init on it. * @return An allocated and initialized object */ + (instancetype)new; /*! * @brief Returns the class. * * @return The class */ + (Class)class; |
︙ | ︙ | |||
622 623 624 625 626 627 628 | * @brief Returns the class. * * This method exists so that classes can be used in collections requiring * conformance to the OFCopying protocol. * * @return The class of the object */ | | | | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | * @brief Returns the class. * * This method exists so that classes can be used in collections requiring * conformance to the OFCopying protocol. * * @return The class of the object */ + (id)copy; /*! * @brief Initializes an already allocated object. * * Derived classes may override this, but need to do * @code * self = [super init] * @endcode * before they do any initialization themselves. @ref init may never return * `nil`, instead an exception (for example @ref * OFInitializationFailedException) should be thrown. * * @return An initialized object */ - (instancetype)init; /*! * @brief Returns the method signature for the specified selector. * * @param selector The selector for which the method signature should be * returned * @return The method signature for the specified selector |
︙ | ︙ | |||
1114 1115 1116 1117 1118 1119 1120 | * * For classes which can be immutable or mutable, this returns an immutable * copy. If only a mutable version of the class exists, it creates a mutable * copy. * * @return A copy of the object */ | | | | 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | * * For classes which can be immutable or mutable, this returns an immutable * copy. If only a mutable version of the class exists, it creates a mutable * copy. * * @return A copy of the object */ - (id)copy; @end /*! * @protocol OFMutableCopying OFObject.h ObjFW/OFObject.h * * @brief A protocol for the creation of mutable copies. * * This protocol is implemented by objects that can be mutable and immutable * and allows returning a mutable copy. */ @protocol OFMutableCopying /*! * @brief Creates a mutable copy of the object. * * @return A mutable copy of the object */ - (id)mutableCopy; @end /*! * @protocol OFComparing OFObject.h ObjFW/OFObject.h * * @brief A protocol for comparing objects. * |
︙ | ︙ |