Skip to content
Snippets Groups Projects
Commit ef5447e3 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by gerrit2
Browse files

ip_utils: fix IP comparaison

Comparing two IP was broken.
If you try "ip1 != ip2" this always return false whatever be
ip1 and ip2.
The operator!= is not called in fact, because ip1 and ip2 were
converted by operator bool() first!

This patch resolves that by:
- mark explicit operator bool()
- declare operator!= as the opposite of operator==

Note: these latest operators have been externalized of the class
as a good C++ practice.

Change-Id: I65d01c391d3871e92bd0d2a49cad3cfa62f698cf
Tuleap: #662
parent cb0ea36b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment