[Liblas-commits] libpc: gcc complains about these,
and I don't get what was going...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Feb 23 22:17:57 EST 2011
details: http://hg.liblas.orglibpc/rev/a31a59dfe4e2
changeset: 87:a31a59dfe4e2
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Feb 23 21:16:36 2011 -0600
description:
gcc complains about these, and I don't get what was going on here. copy/paste error?
Subject: libpc: fix ups to compile on gcc -- we don't link yet though
details: http://hg.liblas.orglibpc/rev/780645897f62
changeset: 88:780645897f62
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Feb 23 21:17:51 2011 -0600
description:
fix ups to compile on gcc -- we don't link yet though
diffstat:
include/libpc/Utils.hpp | 4 +++-
src/FauxReader.cpp | 2 +-
src/PointData.cpp | 6 +++---
src/Schema.cpp | 14 ++++++++------
src/Utils.cpp | 8 ++++----
src/Writer.cpp | 2 +-
6 files changed, 20 insertions(+), 16 deletions(-)
diffs (142 lines):
diff -r c73b09963765 -r 780645897f62 include/libpc/Utils.hpp
--- a/include/libpc/Utils.hpp Wed Feb 23 18:18:58 2011 -0800
+++ b/include/libpc/Utils.hpp Wed Feb 23 21:17:51 2011 -0600
@@ -37,6 +37,8 @@
#include <iosfwd>
#include <string>
+#include <stdexcept>
+#include <cassert>
#include <boost/concept_check.hpp>
#include <boost/cstdint.hpp>
@@ -49,7 +51,7 @@
class LIBPC_DLL Utils
{
public:
- static void Utils::random_seed(unsigned int seed);
+ static void random_seed(unsigned int seed);
static double random(double minimum, double maximum);
// compares two values to within the datatype's epsilon
diff -r c73b09963765 -r 780645897f62 src/FauxReader.cpp
--- a/src/FauxReader.cpp Wed Feb 23 18:18:58 2011 -0800
+++ b/src/FauxReader.cpp Wed Feb 23 21:17:51 2011 -0600
@@ -78,7 +78,7 @@
Header& header = getHeader();
const Bounds<double>& bounds = header.getBounds();
- const std::vector<Range<double>>& dims = bounds.dimensions();
+ const std::vector< Range<double> >& dims = bounds.dimensions();
const double minX = dims[0].getMinimum();
const double maxX = dims[0].getMaximum();
const double minY = dims[1].getMinimum();
diff -r c73b09963765 -r 780645897f62 src/PointData.cpp
--- a/src/PointData.cpp Wed Feb 23 18:18:58 2011 -0800
+++ b/src/PointData.cpp Wed Feb 23 21:17:51 2011 -0600
@@ -46,9 +46,9 @@
PointData::PointData(const SchemaLayout& schemaLayout, boost::uint32_t numPoints) :
m_schemaLayout(schemaLayout),
- m_numPoints(numPoints),
m_data(NULL),
- m_pointSize(0)
+ m_pointSize(0),
+ m_numPoints(numPoints)
{
m_pointSize = m_schemaLayout.getByteSize();
m_data = new boost::uint8_t[m_pointSize * m_numPoints];
@@ -153,7 +153,7 @@
ostr << "Point: " << pointIndex << endl;
- for (SchemaLayout::DimensionLayoutsCIter citer=dimensionLayouts.cbegin(); citer != dimensionLayouts.cend(); ++citer)
+ for (SchemaLayout::DimensionLayoutsCIter citer=dimensionLayouts.begin(); citer != dimensionLayouts.end(); ++citer)
{
const DimensionLayout& dimensionLayout = *citer;
const Dimension& dimension = dimensionLayout.getDimension();
diff -r c73b09963765 -r 780645897f62 src/Schema.cpp
--- a/src/Schema.cpp Wed Feb 23 18:18:58 2011 -0800
+++ b/src/Schema.cpp Wed Feb 23 21:17:51 2011 -0600
@@ -115,7 +115,7 @@
using property_tree::ptree;
ptree pt;
- for (DimensionsCIter iter = m_dimensions.cbegin(); iter != m_dimensions.cend(); ++iter)
+ for (DimensionsCIter iter = m_dimensions.begin(); iter != m_dimensions.end(); ++iter)
{
pt.add_child("LASSchema.dimensions.dimension", (*iter).GetPTree());
}
@@ -195,7 +195,7 @@
os << " ";
const Schema::Dimensions& dimensions = schema.getDimensions();
- for (Schema::DimensionsCIter iter = dimensions.cbegin(); iter != dimensions.cend(); ++iter)
+ for (Schema::DimensionsCIter iter = dimensions.begin(); iter != dimensions.end(); ++iter)
{
os << *iter;
os << " ";
@@ -211,8 +211,9 @@
SchemaLayout::SchemaLayout(const Schema& schema)
- : m_byteSize(0)
- , m_schema(schema)
+ :
+ m_schema(schema)
+ , m_byteSize(0)
{
calculateSizes();
return;
@@ -221,9 +222,10 @@
/// copy constructor
SchemaLayout::SchemaLayout(SchemaLayout const& other)
- : m_dimensionLayouts(other.m_dimensionLayouts)
+ :
+ m_schema(other.m_schema)
+ , m_dimensionLayouts(other.m_dimensionLayouts)
, m_byteSize(other.m_byteSize)
- , m_schema(other.m_schema)
{
}
diff -r c73b09963765 -r 780645897f62 src/Utils.cpp
--- a/src/Utils.cpp Wed Feb 23 18:18:58 2011 -0800
+++ b/src/Utils.cpp Wed Feb 23 21:17:51 2011 -0600
@@ -72,9 +72,9 @@
if (!Utils::fileExists(filename))
throw libpc_error("File not found: " + filename);
- std::ios::openmode mode = mode=std::ios::out;
+ std::ios::openmode mode = std::ios::out;
if (asBinary)
- mode |= mode=std::ios::binary;
+ mode = mode |= std::ios::binary;
namespace io = boost::iostreams;
io::stream<io::file_source>* ifs = new io::stream<io::file_source>();
@@ -86,9 +86,9 @@
std::ostream* Utils::createFile(std::string const& filename, bool asBinary)
{
- std::ios::openmode mode = mode=std::ios::in;
+ std::ios::openmode mode = std::ios::in;
if (asBinary)
- mode |= mode=std::ios::binary;
+ mode = mode |= std::ios::binary;
namespace io = boost::iostreams;
io::stream<io::file_sink>* ofs = new io::stream<io::file_sink>();
diff -r c73b09963765 -r 780645897f62 src/Writer.cpp
--- a/src/Writer.cpp Wed Feb 23 18:18:58 2011 -0800
+++ b/src/Writer.cpp Wed Feb 23 21:17:51 2011 -0600
@@ -65,7 +65,7 @@
}
-boost::uint64_t Writer::write(boost::uint64_t targetNumPointsToWrite)
+boost::uint64_t Writer::write(std::size_t targetNumPointsToWrite)
{
m_targetNumPointsToWrite = targetNumPointsToWrite;
m_actualNumPointsWritten = 0;
More information about the Liblas-commits
mailing list