olena: olena-2.0-854-g874c85f Address Clang warnings in Milena.

* mln/core/image/dmorph/mutable_extension_ima.hh, * tests/metal/is.cc, * tests/transform/fft.cc: Here. --- milena/ChangeLog | 9 +++++++++ milena/mln/core/image/dmorph/mutable_extension_ima.hh | 6 +++--- milena/tests/metal/is.cc | 5 +++-- milena/tests/transform/fft.cc | 13 ++++++++----- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index acf88b9..c00e8fa 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,12 @@ +2014-05-22 Roland Levillain <roland@lrde.epita.fr> + + Address Clang warnings in Milena. + + * mln/core/image/dmorph/mutable_extension_ima.hh, + * tests/metal/is.cc, + * tests/transform/fft.cc: + Here. + 2014-05-20 Roland Levillain <roland@lrde.epita.fr> Improve tests on mln::border::mirror. diff --git a/milena/mln/core/image/dmorph/mutable_extension_ima.hh b/milena/mln/core/image/dmorph/mutable_extension_ima.hh index f208581..701534f 100644 --- a/milena/mln/core/image/dmorph/mutable_extension_ima.hh +++ b/milena/mln/core/image/dmorph/mutable_extension_ima.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2008, 2009, 2010 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2008, 2009, 2010, 2014 EPITA Research and Development +// Laboratory (LRDE). // // This file is part of Olena. // @@ -40,7 +40,7 @@ namespace mln { // Forward declaration. - template <typename I, typename J> struct mutable_extension_ima; + template <typename I, typename J> class mutable_extension_ima; namespace internal diff --git a/milena/tests/metal/is.cc b/milena/tests/metal/is.cc index 9778c6c..d9d1962 100644 --- a/milena/tests/metal/is.cc +++ b/milena/tests/metal/is.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2014 EPITA Research and Development +// Laboratory (LRDE). // // This file is part of Olena. // @@ -39,7 +40,7 @@ struct dest struct from_2 { - operator dest() const { dest* tmp; return *tmp; } + operator dest() const { dest* tmp = 0; return *tmp; } }; diff --git a/milena/tests/transform/fft.cc b/milena/tests/transform/fft.cc index 1dce9df..c5449c9 100644 --- a/milena/tests/transform/fft.cc +++ b/milena/tests/transform/fft.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2012 EPITA Research and Development Laboratory +// Copyright (C) 2004, 2012, 2014 EPITA Research and Development Laboratory. // // This file is part of Olena. // @@ -86,12 +86,15 @@ int main () io::pgm::save(out, "fft_trans_log.pgm"); - for (int row = 40; row < im2.nrows() - 40; ++row) - for (int col = 0; col < im2.ncols(); ++col) + int nrows = im2.nrows(); + int ncols = im2.ncols(); + int hlen = 40; + for (int row = hlen; row < nrows - hlen; ++row) + for (int col = 0; col < ncols; ++col) opt::at(im2, row, col) = 0; - for (int row = 0; row < im2.nrows(); ++row) - for (int col = 40; col < im2.ncols() - 40; ++col) + for (int row = 0; row < nrows; ++row) + for (int col = hlen; col < ncols - hlen; ++col) opt::at(im2, row, col) = 0; fft = fourier.transformed_image_log_magn<int_u8>(true); -- 1.7.10.4
participants (1)
-
Roland Levillain