Skip to content
Snippets Groups Projects
Commit 3f9a12b3 authored by Lars Bilke's avatar Lars Bilke
Browse files

There is no sense in testing the pointer against null, as the memory was...

There is no sense in testing the pointer against null, as the memory was allocated using the 'new' operator.

http://www.viva64.com/en/d/0293/print/
parent 31183f1d
No related branches found
No related tags found
No related merge requests found
...@@ -78,10 +78,6 @@ Raster* Raster::getRasterFromSurface(Surface const& sfc, double cell_size, doubl ...@@ -78,10 +78,6 @@ Raster* Raster::getRasterFromSurface(Surface const& sfc, double cell_size, doubl
const std::size_t n_rows = static_cast<size_t>(fabs(ur[1]-ll[1]) / cell_size)+1; const std::size_t n_rows = static_cast<size_t>(fabs(ur[1]-ll[1]) / cell_size)+1;
const size_t n_triangles (sfc.getNTriangles()); const size_t n_triangles (sfc.getNTriangles());
double *z_vals (new double[n_cols*n_rows]); double *z_vals (new double[n_cols*n_rows]);
if (!z_vals) {
WARN("CreateRaster::getRaster not enough memory for %d x %d raster", n_cols, n_rows);
return NULL;
}
size_t k(0); size_t k(0);
for (size_t r(0); r < n_cols; r++) { for (size_t r(0); r < n_cols; r++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment