Skip to content

Commit

Permalink
Initialize primitives.
Browse files Browse the repository at this point in the history
  • Loading branch information
connormanning committed Dec 12, 2015
1 parent da2346f commit 5d078b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/pdal/PointRef.hpp
Expand Up @@ -54,7 +54,7 @@ class PDAL_DLL PointRef
template<class T>
T getFieldAs(Dimension::Id::Enum dim) const
{
T val;
T val(0);
bool success = true;
Everything e;
Dimension::Type::Enum type = m_layout.dimDetail(dim)->type();
Expand Down
6 changes: 3 additions & 3 deletions io/bpf/BpfReader.cpp
Expand Up @@ -303,7 +303,7 @@ bool BpfReader::eof()

void BpfReader::readPointMajor(PointRef& point)
{
double x, y, z;
double x(0), y(0), z(0);

seekPointMajor(m_index);
for (size_t dim = 0; dim < m_dims.size(); ++dim)
Expand Down Expand Up @@ -369,7 +369,7 @@ point_count_t BpfReader::readPointMajor(PointViewPtr view, point_count_t count)
// This isn't lovely as we have to seek for each dimension access.
void BpfReader::readDimMajor(PointRef& point)
{
double x, y, z;
double x(0), y(0), z(0);

for (size_t dim = 0; dim < m_dims.size(); ++dim)
{
Expand Down Expand Up @@ -445,7 +445,7 @@ void BpfReader::readByteMajor(PointRef& point)
float f;
uint32_t u32;
} u;
double x, y, z;
double x(0), y(0), z(0);
uint8_t u8;

for (size_t dim = 0; dim < m_dims.size(); ++dim)
Expand Down
6 changes: 3 additions & 3 deletions io/faux/FauxReader.cpp
Expand Up @@ -184,9 +184,9 @@ void FauxReader::ready(PointTableRef /*table*/)

bool FauxReader::processOne(PointRef& point)
{
double x;
double y;
double z;
double x(0);
double y(0);
double z(0);

if (m_index >= m_count)
return false;
Expand Down

0 comments on commit 5d078b1

Please sign in to comment.