Skip to content

fixed warnings for lack of precision when building promise for 64-bit.#7

Closed
joelparsons wants to merge 1 commit into
mproberts:masterfrom
joelparsons:lack-of-precision
Closed

fixed warnings for lack of precision when building promise for 64-bit.#7
joelparsons wants to merge 1 commit into
mproberts:masterfrom
joelparsons:lack-of-precision

Conversation

@joelparsons

Copy link
Copy Markdown

The collection returns an NSUInteger for -count.

From apple's Header:

#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif

As such casting this message to int on a 64-bit build produces a warning about a lack of precision in the receiving type. Fixed by using the NSUInteger type.

@joelparsons

Copy link
Copy Markdown
Author

crap this duplicates #6
Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant