Skip to content

Commit

Permalink
silence bool conversion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Apr 11, 2013
1 parent faf202a commit 9feec90
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/SpatialReference.cpp
Expand Up @@ -278,11 +278,17 @@ bool SpatialReference::isGeographic() const

OGRSpatialReferenceH current = OSRNewSpatialReference(getWKT(eCompoundOK, false).c_str());

bool geog = static_cast<bool>(OSRIsGeographic(current));
int isGeog = OSRIsGeographic(current);
bool output(false);

if (isGeog == 0)
output = false;
else
output = true;

OSRDestroySpatialReference(current);

return geog;
return output;
#else
throw std::runtime_error("GDAL is not available, SpatialReference could not determine if isGeographic");
#endif
Expand Down

0 comments on commit 9feec90

Please sign in to comment.