256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
{
if (uIntMax <= ULLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithUnsignedLongLong: (unsigned long long)uIntMax];
return (id)[[OFNumber of_alloc] initWithUIntMax: uIntMax];
}
- (instancetype)initWithPtrDiff: (ptrdiff_t)ptrDiff
{
if (ptrDiff >= LLONG_MIN && ptrDiff <= LLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithLongLong: (long long)ptrDiff];
|
>
>
>
>
>
>
>
>
>
|
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
{
if (uIntMax <= ULLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithUnsignedLongLong: (unsigned long long)uIntMax];
return (id)[[OFNumber of_alloc] initWithUIntMax: uIntMax];
}
#ifdef __clang__
/*
* This warning should probably not exist at all, as it prevents checking
* whether one type fits into another in a portable way.
*/
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#endif
- (instancetype)initWithPtrDiff: (ptrdiff_t)ptrDiff
{
if (ptrDiff >= LLONG_MIN && ptrDiff <= LLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithLongLong: (long long)ptrDiff];
|
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
{
if (uIntPtr <= ULLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithUnsignedLongLong: (unsigned long long)uIntPtr];
return (id)[[OFNumber of_alloc] initWithUIntPtr: uIntPtr];
}
- (instancetype)initWithFloat: (float)float_
{
if (float_ == (uintmax_t)float_)
return (id)[[OFNumber of_alloc]
initWithUIntMax: (uintmax_t)float_];
if (float_ == (intmax_t)float_)
|
>
>
>
>
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
{
if (uIntPtr <= ULLONG_MAX)
return (id)[[OFNumber of_alloc]
initWithUnsignedLongLong: (unsigned long long)uIntPtr];
return (id)[[OFNumber of_alloc] initWithUIntPtr: uIntPtr];
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
- (instancetype)initWithFloat: (float)float_
{
if (float_ == (uintmax_t)float_)
return (id)[[OFNumber of_alloc]
initWithUIntMax: (uintmax_t)float_];
if (float_ == (intmax_t)float_)
|