Skip to content

Commit 69f8676

Browse files
authored
Merge pull request #2182 from MichaelChirico/unused-warning
hide unused variable when unused
2 parents 65c0f9d + 01342e8 commit 69f8676

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/geos.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,9 @@ Rcpp::List CPL_geos_op2(std::string op, Rcpp::List sfcx, Rcpp::List sfcy) {
943943
std::vector<GeomPtr> out;
944944
std::vector<double> index_x, index_y;
945945
std::vector<size_t> items(x.size());
946+
#ifdef HAVE_390
946947
double grid_size = geos_grid_size_xy(sfcx, sfcy);
948+
#endif
947949

948950
if (op == "intersection") {
949951

@@ -1185,7 +1187,9 @@ Rcpp::List CPL_nary_difference(Rcpp::List sfc) {
11851187
GEOSContextHandle_t hGEOSCtxt = CPL_geos_init();
11861188
std::vector<GeomPtr> x = geometries_from_sfc(hGEOSCtxt, sfc, &dim);
11871189
std::vector<GeomPtr> out;
1190+
#ifdef HAVE_390
11881191
double grid_size = geos_grid_size(sfc);
1192+
#endif
11891193
// initialize trees to find overlapping areas quickly
11901194
for (size_t i = 0; i < x.size(); i++) {
11911195
// if i'th geometry in x is empty then skip it
@@ -1255,7 +1259,9 @@ Rcpp::List CPL_nary_intersection(Rcpp::List sfc) {
12551259
std::vector<GeomPtr> x = geometries_from_sfc(hGEOSCtxt, sfc, &dim);
12561260
std::vector<GeomPtr> out;
12571261
int errors = 0;
1262+
#ifdef HAVE_390
12581263
double grid_size = geos_grid_size(sfc);
1264+
#endif
12591265
#ifdef HAVE350
12601266
notice = 0;
12611267
GEOSContext_setNoticeMessageHandler_r(hGEOSCtxt,

0 commit comments

Comments
 (0)