Skip to content

Commit 0aa9734

Browse files
author
Paul Harwood
committed
more astyle
1 parent a2b665f commit 0aa9734

File tree

7 files changed

+477
-477
lines changed

7 files changed

+477
-477
lines changed

source/pdal/pdalc_dimtype.cpp

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -37,122 +37,122 @@ namespace capi
3737
{
3838
size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types)
3939
{
40-
pdal::capi::DimTypeList *wrapper = reinterpret_cast<pdal::capi::DimTypeList *>(types);
40+
pdal::capi::DimTypeList *wrapper = reinterpret_cast<pdal::capi::DimTypeList *>(types);
4141

42-
size_t size = 0;
42+
size_t size = 0;
4343

44-
if (wrapper && wrapper->get())
45-
{
46-
try
47-
{
48-
pdal::DimTypeList *list = wrapper->get();
49-
size = list->size();
50-
}
51-
catch (const std::exception &e)
44+
if (wrapper && wrapper->get())
5245
{
53-
printf("%s\n", e.what());
46+
try
47+
{
48+
pdal::DimTypeList *list = wrapper->get();
49+
size = list->size();
50+
}
51+
catch (const std::exception &e)
52+
{
53+
printf("%s\n", e.what());
54+
}
5455
}
55-
}
5656

57-
return size;
57+
return size;
5858
}
5959

6060
uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types)
6161
{
62-
uint64_t byteCount = 0;
63-
size_t pointCount = PDALGetDimTypeListSize(types);
62+
uint64_t byteCount = 0;
63+
size_t pointCount = PDALGetDimTypeListSize(types);
6464

65-
for (size_t i = 0; i < pointCount; ++i)
66-
{
67-
byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i));
68-
}
65+
for (size_t i = 0; i < pointCount; ++i)
66+
{
67+
byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i));
68+
}
6969

70-
return byteCount;
70+
return byteCount;
7171
}
7272

7373
PDALDimType PDALGetInvalidDimType()
7474
{
75-
PDALDimType dim =
76-
{
77-
static_cast<uint32_t>(pdal::Dimension::id("")), static_cast<uint32_t>(pdal::Dimension::type("")),
78-
1.0, 0.0
79-
};
75+
PDALDimType dim =
76+
{
77+
static_cast<uint32_t>(pdal::Dimension::id("")), static_cast<uint32_t>(pdal::Dimension::type("")),
78+
1.0, 0.0
79+
};
8080

81-
return dim;
81+
return dim;
8282
}
8383

8484
size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size)
8585
{
86-
size_t result = 0;
86+
size_t result = 0;
8787

88-
if (name && size > 0)
89-
{
90-
std::string s = pdal::Dimension::name(
91-
static_cast<pdal::Dimension::Id>(dim.id));
92-
std::strncpy(name, s.c_str(), size);
93-
result = std::min(std::strlen(name), size);
94-
}
88+
if (name && size > 0)
89+
{
90+
std::string s = pdal::Dimension::name(
91+
static_cast<pdal::Dimension::Id>(dim.id));
92+
std::strncpy(name, s.c_str(), size);
93+
result = std::min(std::strlen(name), size);
94+
}
9595

96-
return result;
96+
return result;
9797
}
9898

9999
size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size)
100100
{
101-
size_t result = 0;
101+
size_t result = 0;
102102

103-
if (name && size > 0)
104-
{
105-
std::string s = pdal::Dimension::interpretationName(
106-
static_cast<pdal::Dimension::Type>(dim.type));
107-
std::strncpy(name, s.c_str(), size);
108-
result = std::min(std::strlen(name), size);
109-
}
103+
if (name && size > 0)
104+
{
105+
std::string s = pdal::Dimension::interpretationName(
106+
static_cast<pdal::Dimension::Type>(dim.type));
107+
std::strncpy(name, s.c_str(), size);
108+
result = std::min(std::strlen(name), size);
109+
}
110110

111-
return result;
111+
return result;
112112
}
113113

114114
size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim)
115115
{
116-
return pdal::Dimension::size(static_cast<pdal::Dimension::Type>(dim.type));
116+
return pdal::Dimension::size(static_cast<pdal::Dimension::Type>(dim.type));
117117
}
118118

119119
PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index)
120120
{
121-
pdal::capi::DimTypeList *wrapper = reinterpret_cast<pdal::capi::DimTypeList *>(types);
121+
pdal::capi::DimTypeList *wrapper = reinterpret_cast<pdal::capi::DimTypeList *>(types);
122122

123-
PDALDimType dim = PDALGetInvalidDimType();
123+
PDALDimType dim = PDALGetInvalidDimType();
124124

125-
if (wrapper && wrapper->get())
126-
{
127-
try
125+
if (wrapper && wrapper->get())
128126
{
129-
pdal::DimTypeList *list = wrapper->get();
130-
131-
if (index < list->size())
127+
try
132128
{
133-
pdal::DimType nativeDim = list->at(index);
134-
dim.id = static_cast<uint32_t>(nativeDim.m_id);
135-
dim.type = static_cast<uint32_t>(nativeDim.m_type);
136-
dim.scale = nativeDim.m_xform.m_scale.m_val;
137-
dim.offset = nativeDim.m_xform.m_offset.m_val;
129+
pdal::DimTypeList *list = wrapper->get();
130+
131+
if (index < list->size())
132+
{
133+
pdal::DimType nativeDim = list->at(index);
134+
dim.id = static_cast<uint32_t>(nativeDim.m_id);
135+
dim.type = static_cast<uint32_t>(nativeDim.m_type);
136+
dim.scale = nativeDim.m_xform.m_scale.m_val;
137+
dim.offset = nativeDim.m_xform.m_offset.m_val;
138+
}
139+
}
140+
catch (const std::exception &e)
141+
{
142+
printf("%s\n", e.what());
138143
}
139144
}
140-
catch (const std::exception &e)
141-
{
142-
printf("%s\n", e.what());
143-
}
144-
}
145145

146-
return dim;
146+
return dim;
147147
}
148148

149149
void PDALDisposeDimTypeList(PDALDimTypeListPtr types)
150150
{
151-
if (types)
152-
{
153-
pdal::capi::DimTypeList *ptr = reinterpret_cast<pdal::capi::DimTypeList *>(types);
154-
delete ptr;
155-
}
151+
if (types)
152+
{
153+
pdal::capi::DimTypeList *ptr = reinterpret_cast<pdal::capi::DimTypeList *>(types);
154+
delete ptr;
155+
}
156156
}
157157
}
158158
}

source/pdal/pdalc_forward.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ typedef struct PDALDimType PDALDimType;
8181
struct PDALDimType
8282
{
8383
/// The dimension's identifier
84-
uint32_t id;
84+
uint32_t id;
8585

8686
/// The dimension's interpretation type
87-
uint32_t type;
87+
uint32_t type;
8888

8989
/// The dimension's scaling factor
90-
double scale;
90+
double scale;
9191

9292
/// The dimension's offset value
93-
double offset;
93+
double offset;
9494
};
9595

9696
/// A pointer to a dimension type list

0 commit comments

Comments
 (0)