Differences From Artifact [34d1acfa38]:
- File src/OFNumber.m — part of check-in [6ae98c1dcf] at 2021-04-25 19:58:13 on branch trunk — Last round of renames (hopefully) (user: js, size: 27470) [annotate] [blame] [check-ins using] [more...]
To Artifact [fd08ff8e66]:
- File
src/OFNumber.m
— part of check-in
[e53c0160a8]
at
2022-06-06 07:06:25
on branch trunk
— Always implement dummy for OF_UNAVAILABLE methods
GCC now supports the attribute, but still complains if the method is not
implemented, so always implement it with a method that throws. (user: js, size: 28193) [annotate] [blame] [check-ins using] [more...]
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
507 508 509 510 511 512 513 514 515 516 517 518 519 520 | + (instancetype)alloc { if (self == [OFNumber class]) return (id)&placeholder; return [super alloc]; } + (instancetype)numberWithBool: (bool)value { return [[[self alloc] initWithBool: value] autorelease]; } + (instancetype)numberWithChar: (signed char)value | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | + (instancetype)alloc { if (self == [OFNumber class]) return (id)&placeholder; return [super alloc]; } + (instancetype)valueWithBytes: (const void *)bytes objCType: (const char *)objCType { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithPointer: (const void *)pointer { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithNonretainedObject: (id)object { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithRange: (OFRange)range { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithPoint: (OFPoint)point { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithSize: (OFSize)size { OF_UNRECOGNIZED_SELECTOR } + (instancetype)valueWithRect: (OFRect)rect { OF_UNRECOGNIZED_SELECTOR } + (instancetype)numberWithBool: (bool)value { return [[[self alloc] initWithBool: value] autorelease]; } + (instancetype)numberWithChar: (signed char)value |
︙ | ︙ | |||
575 576 577 578 579 580 581 582 583 584 585 586 587 588 | + (instancetype)numberWithDouble: (double)value { return [[[self alloc] initWithDouble: value] autorelease]; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithBool: (bool)value { self = [super init]; | > > > > > > | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | + (instancetype)numberWithDouble: (double)value { return [[[self alloc] initWithDouble: value] autorelease]; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithBytes: (const void *)bytes objCType: (const char *)objCType { OF_INVALID_INIT_METHOD } - (instancetype)initWithBool: (bool)value { self = [super init]; |
︙ | ︙ |