Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Fixed an 'comparison between pointer and integer' error on clang std=c++... #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tzaeru
Copy link

@tzaeru tzaeru commented Mar 15, 2015

Heya,

On Clang 3.4, with C++11 mode, there's a build error stemming from the comparison of integer and pointer. I don't think this should be an error according to the standard, but I figure that 'NULL' and 'false' are fully interchangeable in this context, so I changed the pointer comparison to be against 'NULL'.

Thanks,
tz

@ensiform
Copy link

Since you're using C++11 mode, wouldn't nullptr be better?

@tzaeru
Copy link
Author

tzaeru commented Mar 15, 2015

Yeah, for me it would, but I suppose that using 'NULL' is more independent of compiler and C++ version while also being accepted by clang under C++11.

@Luke1410
Copy link

Luke1410 commented Aug 2, 2017

Duplicates part of #29 which is integrated in https://github.com/SLikeSoft/SLikeNet (incorporated in SLikeNet 0.1.0).

Copy link

@crookedbard crookedbard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helped me to build raknet lib on xcode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants