[GRASS-SVN] r73078 - grass-addons/grass7/raster/r.houghtransform

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 11 19:46:31 PDT 2018


Author: wenzeslaus
Date: 2018-08-11 19:46:31 -0700 (Sat, 11 Aug 2018)
New Revision: 73078

Modified:
   grass-addons/grass7/raster/r.houghtransform/hough.cpp
Log:
r.houghtransform: no namespace for extern functions

Avoids compilation error with clang 3.8.0 and g++.
Namespace for C functions creates some confusion leading to
* conflicting types for sigsetjmp (clang)
* no member named size_t in namespace grass::std; did you mean ::std::size_t (clang)
* grass::std::size_t has not been declared (g++)
* error: ::max_align_t has not been declared (g++)


Modified: grass-addons/grass7/raster/r.houghtransform/hough.cpp
===================================================================
--- grass-addons/grass7/raster/r.houghtransform/hough.cpp	2018-08-12 02:34:53 UTC (rev 73077)
+++ grass-addons/grass7/raster/r.houghtransform/hough.cpp	2018-08-12 02:46:31 UTC (rev 73078)
@@ -4,7 +4,6 @@
 #include "matrix.h"
 
 extern "C" {
-namespace grass {
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/vector.h>
@@ -11,38 +10,7 @@
 #include <grass/glocale.h>
 #include <grass/gmath.h>
 }
-}
 
-using grass::DCELL;
-using grass::CELL;
-using grass::G__calloc;
-using grass::Cell_head;
-using grass::Map_info;
-
-using grass::Vect_new_cats_struct;
-using grass::Vect_new_line_struct;
-
-using grass::Rast_allocate_c_input_buf;
-using grass::Rast_open_old;
-using grass::Rast_get_row;
-using grass::Rast_close;
-
-using grass::Rast_window_rows;
-using grass::Rast_window_cols;
-using grass::Rast_allocate_c_buf;
-using grass::Rast_open_fp_new;
-using grass::Rast_put_c_row;
-using grass::Rast_get_cellhd;
-
-using grass::G_gettext;
-using grass::G_fatal_error;
-using grass::G_debug;
-using grass::G_free;
-
-using grass::Colors;
-using grass::Range;
-using grass::G_mapset;
-
 /** Loads map into memory.
 
   \param[out] mat map in a matrix (row order), field have to be allocated
@@ -160,8 +128,8 @@
     struct Map_info Map;
     Vect_open_new(&Map, name, 0);
 
-    struct grass::line_cats *Cats;
-    struct grass::line_pnts *points;
+    struct line_cats *Cats;
+    struct line_pnts *points;
     Cats = Vect_new_cats_struct();
     points = Vect_new_line_struct();
 



More information about the grass-commit mailing list