From c929438500e30c055542bed65680fade83cb27ed Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 6 Sep 2012 09:51:58 +0200 Subject: [PATCH] changes for non pointer types --- GeoLib/Grid.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GeoLib/Grid.h b/GeoLib/Grid.h index 67201783113..b0b9eb5e408 100644 --- a/GeoLib/Grid.h +++ b/GeoLib/Grid.h @@ -137,7 +137,7 @@ public: std::cout << "error computing indices " << std::endl; } - _grid_cell_nodes_map[i + j * _n_steps[0] + k * n_plane].push_back(copyOrAddress(*it)); + _grid_cell_nodes_map[i + j * _n_steps[0] + k * n_plane].push_back(const_cast<POINT*>(copyOrAddress(*it))); it++; } @@ -328,6 +328,7 @@ private: } static POINT* copyOrAddress(POINT& p) { return &p; } + static POINT const* copyOrAddress(POINT const& p) { return &p; } static POINT* copyOrAddress(POINT* p) { return p; } double _step_sizes[3]; -- GitLab