Skip to content

Commit 8b0b0f2

Browse files
authored
Merge pull request #1826 from DGtal-team/TestAffine
testAffineBasis fix
2 parents 4d5b790 + 19b93bb commit 8b0b0f2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ git remote set-head origin -a
4646
- Fix issue [#1797](https://github.com/DGtal-team/DGtal/pull/1797), assertions raised in testCellGeometry and testDigitalConvexity because of improper digital space extent (Jacques-Olivier Lachaud, [#1801](https://github.com/DGtal-team/DGtal/pull/1801))
4747
- QuickHull could sometimes output that its output was not full dimensional since the computation of affine dimension was randomized. Now QuickHull relies on an exact computation of affine dimension (Jacques-Olivier Lachaud, [#1803](https://github.com/DGtal-team/DGtal/pull/1803))
4848
- Silencing a warning in the Naive3DDSSComputer.ih file. (David Coeurjolly, [#1815](https://github.com/DGtal-team/DGtal/pull/1815))
49-
49+
- Fix issue in `testAffineBasis` that may produce errors for some compilers (David Coeurjolly, [#1826](https://github.com/DGtal-team/DGtal/pull/1826))
50+
5051
- *Build*
5152
- Version is now extracted from the `VERSION` file for CMake and Python builds (Bastien Doignies, [#1810](https://github.com/DGtal-team/DGtal/pull/1810))
5253
- Eigen is now properly fetched when DGTAL_ITK_WITH_EIGEN is set (Bastien Doignies, [#1818](https://github.com/DGtal-team/DGtal/pull/1818))

tests/geometry/tools/testAffineBasis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ SCENARIO( "AffineBasis< Point4i > unit tests", "[affine_basis][4i]" )
230230
for ( auto p : X )
231231
{
232232
const auto [d, lambda, rem ] = B.decompose( p );
233-
nb_ok += ( rem == Point::zero ) ? : 1;
233+
nb_ok += ( rem == Point::zero ) ? 1:0;
234234
if ( rem != Point::zero )
235235
std::cout << "p=" << p << " d=" << d
236236
<< " lambda=" << lambda << " rem=" << rem << "\n";
@@ -245,7 +245,7 @@ SCENARIO( "AffineBasis< Point4i > unit tests", "[affine_basis][4i]" )
245245
const auto p = y + B.first;
246246
const auto [d, lambda, rem ] = B.decompose( p );
247247
auto q = B.recompose( d, lambda, rem );
248-
nb_ok += ( p == q ) ? : 1;
248+
nb_ok += ( p == q ) ? 1: 0;
249249
if ( p != q )
250250
std::cout << "p=" << p << " d=" << d
251251
<< " lambda=" << lambda << " rem=" << rem
@@ -428,7 +428,7 @@ SCENARIO( "AffineBasis< Z10 > LLL tests", "[affine_basis][10d][LLL]" )
428428
unsigned int nbok = 0;
429429
for ( auto i = 0; i < V.size(); i++ )
430430
{
431-
nbok += V[ i ].norm1() == 1 ? : 0;
431+
nbok += (V[ i ].norm1() == 1) ? 1 : 0;
432432
nb++;
433433
}
434434
CAPTURE( L.basis() );

0 commit comments

Comments
 (0)