[Liblas-commits] hg: CMake target for 2010 is just 10
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jan 21 12:46:29 EST 2011
details: http://hg.liblas.orghg/rev/4d6d7d11a1fb
changeset: 2808:4d6d7d11a1fb
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 21 10:29:29 2011 -0600
description:
CMake target for 2010 is just 10
Subject: hg: cast to eliminate warning about stream offset
details: http://hg.liblas.orghg/rev/e64a9b4b69d2
changeset: 2809:e64a9b4b69d2
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 21 10:29:46 2011 -0600
description:
cast to eliminate warning about stream offset
Subject: hg: merge
details: http://hg.liblas.orghg/rev/187599d6d530
changeset: 2810:187599d6d530
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 21 11:46:20 2011 -0600
description:
merge
diffstat:
apps/oci_util.cpp | 2 +-
hobu-config.bat | 2 +-
src/c_api.cpp | 25 +++----------------------
3 files changed, 5 insertions(+), 24 deletions(-)
diffs (66 lines):
diff -r b1dbaf051135 -r 187599d6d530 apps/oci_util.cpp
--- a/apps/oci_util.cpp Fri Jan 21 09:53:35 2011 -0600
+++ b/apps/oci_util.cpp Fri Jan 21 11:46:20 2011 -0600
@@ -34,7 +34,7 @@
char* data;
if (infile->good()){
size = infile->tellg();
- data = new char [size];
+ data = new char [static_cast<boost::uint32_t>(size)];
infile->seekg (0, std::ios::beg);
infile->read (data, size);
// infile->close();
diff -r b1dbaf051135 -r 187599d6d530 hobu-config.bat
--- a/hobu-config.bat Fri Jan 21 09:53:35 2011 -0600
+++ b/hobu-config.bat Fri Jan 21 11:46:20 2011 -0600
@@ -2,7 +2,7 @@
set G="NMake Makefiles"
REM set G="Visual Studio 9 2008"
-REM set G="Visual Studio 2010"
+REM set G="Visual Studio 10"
set LIBLAS=D:\liblas
set OSGEO4W=C:\OSGeo4W
set BOOST=D:\boost\boost_1_44
diff -r b1dbaf051135 -r 187599d6d530 src/c_api.cpp
--- a/src/c_api.cpp Fri Jan 21 09:53:35 2011 -0600
+++ b/src/c_api.cpp Fri Jan 21 11:46:20 2011 -0600
@@ -1550,23 +1550,8 @@
else {
m = std::ios::out | std::ios::binary | std::ios::ate;
}
-
- if (compare_no_case(filename,"STOUT",5) == 0)
- {
- ostrm = &std::cout;
- }
- else
- {
- ostrm = new std::ofstream(filename, m);
- }
-
-
- if (!ostrm->good())
- {
- delete ostrm;
- throw std::runtime_error("Writing stream was not able to be created");
- }
-
+
+ ostrm = liblas::Create(filename, m);
liblas::Header* header = ((liblas::Header*) hHeader);
liblas::Writer* writer = new liblas::Writer(*ostrm, *header);
@@ -1672,11 +1657,7 @@
return;
}
- if (static_cast<std::ofstream&>(*ostrm))
- static_cast<std::ofstream&>(*ostrm).close();
-
- if (ostrm != NULL)
- delete ostrm;
+ liblas::Cleanup(ostrm);
writers.erase(writer);
More information about the Liblas-commits
mailing list