Address::compare() fixed by ybainier · Pull Request #234 · apache/cassandra-cpp-driver · GitHub
Skip to content

Address::compare() fixed#234

Closed
ybainier wants to merge 2 commits into
apache:masterfrom
ybainier:master
Closed

Address::compare() fixed#234
ybainier wants to merge 2 commits into
apache:masterfrom
ybainier:master

Conversation

@ybainier

Copy link
Copy Markdown

Some IPv4 addresses could not be found in IOWorker::PoolMap instance because Address::compare() method was broken on Windows x64.

Some IPv4 addresses could not be found in IOWorker::PoolMap instance because  Address::compare() method was broken on Windows x64.
@datastax-bot

Copy link
Copy Markdown

@datastax-bot

Copy link
Copy Markdown

Thank you @ybainier for signing the Contribution License Agreement.

Cheers,
DataStax Bot.

@mpenick

mpenick commented Oct 19, 2015

Copy link
Copy Markdown
Contributor

@ybainier Great find! That's a huge unsigned subtract fail. Thanks.

I would almost prefer using: if (a != b) return a < b ? -1 : 1 then have a default return 0 at the end. That way we don't have to use a 64-bit type (the driver is being used on 32-bit platforms too) What do you think?

@ybainier

Copy link
Copy Markdown
Author

That's clever and looks better.

@mpenick

mpenick commented Oct 22, 2015

Copy link
Copy Markdown
Contributor

@mpenick mpenick closed this Oct 22, 2015
mikefero pushed a commit that referenced this pull request Jul 1, 2019
…234)

* Fix header include guards
* Move cassconfig.hpp.in to driver_config.hpp.in
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.

3 participants