mirror of https://github.com/CGAL/cgal
use variables to avoid clang warning
This commit is contained in:
parent
455190a2e4
commit
2c8c044db5
|
|
@ -193,7 +193,9 @@ int main ()
|
||||||
q>q; q>r; r>q; q>1; 1>q;
|
q>q; q>r; r>q; q>1; 1>q;
|
||||||
q<=q; q<=r; r<=q; q<=1; 1<=q;
|
q<=q; q<=r; r<=q; q<=1; 1<=q;
|
||||||
q>=q; q>=r; r>=q; q>=1; 1>=q;
|
q>=q; q>=r; r>=q; q>=1; 1>=q;
|
||||||
bool b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q;
|
|
||||||
|
bool b; // avoid clang warning: equality comparison result unused [-Wunused-comparison]
|
||||||
|
b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q;
|
||||||
b = q!=q; b = q!=r; b = r!=q; b = q!=1; b = 1!=q;
|
b = q!=q; b = q!=r; b = r!=q; b = q!=1; b = 1!=q;
|
||||||
|
|
||||||
// Test comparisons with double.
|
// Test comparisons with double.
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Sylvain Pion
|
// Sylvain Pion
|
||||||
|
|
||||||
#include <CGAL/Quotient.h>
|
#include <CGAL/Quotient.h>
|
||||||
|
#include <CGAL/use.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/MP_Float.h>
|
#include <CGAL/MP_Float.h>
|
||||||
#ifdef CGAL_USE_GMP
|
#ifdef CGAL_USE_GMP
|
||||||
|
|
@ -52,10 +53,13 @@ void test_comparison_operators()
|
||||||
-q;
|
-q;
|
||||||
q<q; q<r; r<q; q<1; 1<q;
|
q<q; q<r; r<q; q<1; 1<q;
|
||||||
q>q; q>r; r>q; q>1; 1>q;
|
q>q; q>r; r>q; q>1; 1>q;
|
||||||
q<=q; q<=r; r<=q; q<=1; 1<=q;
|
|
||||||
|
bool b; // avoid clang warning: equality comparison result unused [-Wunused-comparison]
|
||||||
|
b = q<=q; b = q<=r; b = r<=q; b = q<=1; b = 1<=q;
|
||||||
q>=q; q>=r; r>=q; q>=1; 1>=q;
|
q>=q; q>=r; r>=q; q>=1; 1>=q;
|
||||||
q==q; q==r; r==q; q==1; 1==q;
|
b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q;
|
||||||
q!=q; q!=r; r!=q; q!=1; 1!=q;
|
b = q!=q; b = q!=r; b = r!=q; b = q!=1; b = 1!=q;
|
||||||
|
CGAL_USE(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue