[Liblas-commits] hg: Fixed missing return for some execution paths.
Simplified mu...
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Aug 24 09:46:09 EDT 2010
changeset b08db92cda33 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=b08db92cda33
summary: Fixed missing return for some execution paths. Simplified multi-line #ifdef.
diffstat:
src/lasspatialreference.cpp | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diffs (49 lines):
diff -r d3e162291582 -r b08db92cda33 src/lasspatialreference.cpp
--- a/src/lasspatialreference.cpp Tue Aug 24 14:42:48 2010 +0100
+++ b/src/lasspatialreference.cpp Tue Aug 24 14:46:13 2010 +0100
@@ -562,8 +562,8 @@
// if we have libgeotiff but not GDAL, we'll use the
// simple method in libgeotiff
-#ifdef HAVE_LIBGEOTIFF
-#ifndef HAVE_GDAL
+#if defined(HAVE_LIBGEOTIFF) && !defined(HAVE_GDAL)
+
GTIFDefn defn;
if (m_gtiff && GTIFGetDefn(m_gtiff, &defn))
@@ -575,14 +575,9 @@
return tmp;
}
#endif
-#endif
-#ifndef HAVE_LIBGEOTIFF
-#ifndef HAVE_GDAL
- // If we have neither GDAL nor proj.4, we can't do squat
+ // By default or if we have neither GDAL nor proj.4, we can't do squat
return std::string();
-#endif
-#endif
}
void SpatialReference::SetProj4(std::string const& v)
@@ -635,8 +630,7 @@
// if we have libgeotiff but not GDAL, we'll use the
// simple method in libgeotiff
-#ifdef HAVE_LIBGEOTIFF
-#ifndef HAVE_GDAL
+#if defined(HAVE_LIBGEOTIFF) && !defined(HAVE_GDAL)
int ret = 0;
ret = GTIFSetFromProj4( m_gtiff, v.c_str());
@@ -651,7 +645,7 @@
throw std::runtime_error("The geotiff keys could not be written");
}
#endif
-#endif
+
ResetVLRs();
}
More information about the Liblas-commits
mailing list