Skip to content

Commit

Permalink
Tools
Browse files Browse the repository at this point in the history
- fixed a bug in the version comparison
  • Loading branch information
Jmgr committed Aug 28, 2011
1 parent f68623d commit 45ad7be
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tools/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,28 +197,46 @@ namespace Tools
case 2:
if(d->major < other.d->major)
return true;
if(d->major > other.d->major)
return false;
if(d->minor < other.d->minor)
return true;
if(d->minor > other.d->minor)
return false;

return false;
case 3:
if(d->major < other.d->major)
return true;
if(d->major > other.d->major)
return false;
if(d->minor < other.d->minor)
return true;
if(d->minor > other.d->minor)
return false;
if(d->micro < other.d->micro)
return true;
if(d->micro > other.d->micro)
return false;

return false;
case 4:
if(d->major < other.d->major)
return true;
if(d->major > other.d->major)
return false;
if(d->minor < other.d->minor)
return true;
if(d->minor > other.d->minor)
return false;
if(d->micro < other.d->micro)
return true;
if(d->micro > other.d->micro)
return false;
if(d->nano < other.d->nano)
return true;
if(d->nano > other.d->nano)
return false;

return false;
default:
Expand All @@ -241,28 +259,46 @@ namespace Tools
case 2:
if(d->major > other.d->major)
return true;
if(d->major < other.d->major)
return false;
if(d->minor > other.d->minor)
return true;
if(d->minor < other.d->minor)
return false;

return false;
case 3:
if(d->major > other.d->major)
return true;
if(d->major < other.d->major)
return false;
if(d->minor > other.d->minor)
return true;
if(d->minor < other.d->minor)
return false;
if(d->micro > other.d->micro)
return true;
if(d->micro < other.d->micro)
return false;

return false;
case 4:
if(d->major > other.d->major)
return true;
if(d->major < other.d->major)
return false;
if(d->minor > other.d->minor)
return true;
if(d->minor < other.d->minor)
return false;
if(d->micro > other.d->micro)
return true;
if(d->micro < other.d->micro)
return false;
if(d->nano > other.d->nano)
return true;
if(d->nano < other.d->nano)
return false;

return false;
default:
Expand Down

0 comments on commit 45ad7be

Please sign in to comment.