From 31183f1dfd76ed40cc355153555aacecb424015c Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 11 Aug 2014 11:08:33 +0200 Subject: [PATCH] The expression was implicitly casted from integer type to real type. http://www.viva64.com/en/d/0254/print/ --- MeshLib/MeshGenerators/MeshLayerMapper.cpp | 2 +- SimpleTests/MatrixTests/MatTestRemoveRowsCols.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MeshLib/MeshGenerators/MeshLayerMapper.cpp b/MeshLib/MeshGenerators/MeshLayerMapper.cpp index fa8788d0bdd..8385a40c383 100644 --- a/MeshLib/MeshGenerators/MeshLayerMapper.cpp +++ b/MeshLib/MeshGenerators/MeshLayerMapper.cpp @@ -200,7 +200,7 @@ bool MeshLayerMapper::LayerMapping(MeshLib::Mesh &new_mesh, const GeoLib::Raster nodes[i]->updateCoordinates(coords[0], coords[1], noDataReplacementValue); continue; } - const double norm = 4/(4-no_data_count); + const double norm = (double)(4)/(4-no_data_count); std::for_each(weight.begin(), weight.end(), [&norm](double &val){val*=norm;}); } diff --git a/SimpleTests/MatrixTests/MatTestRemoveRowsCols.cpp b/SimpleTests/MatrixTests/MatTestRemoveRowsCols.cpp index 7200b5649dc..dc1c2ac9b8b 100644 --- a/SimpleTests/MatrixTests/MatTestRemoveRowsCols.cpp +++ b/SimpleTests/MatrixTests/MatTestRemoveRowsCols.cpp @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) // *** reading matrix in crs format from file std::ifstream in(fname_mat.c_str(), std::ios::in | std::ios::binary); double *A(NULL); - unsigned *iA(NULL), *jA(NULL), n; + unsigned *iA(NULL), *jA(NULL), n = 0; if (in) { if (verbose) { std::cout << "reading matrix from " << fname_mat << " ... " << std::flush; -- GitLab