Skip to content

Commit 63b4781

Browse files
committed
astyle changes
1 parent 7da3502 commit 63b4781

File tree

8 files changed

+522
-522
lines changed

8 files changed

+522
-522
lines changed

source/pdal/CMakeLists.txt

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,65 @@ find_package(PDAL REQUIRED CONFIG)
44
message(STATUS "Found PDAL ${PDAL_VERSION}")
55

66
set(SOURCES
7-
pdalc_config.cpp
8-
pdalc_dimtype.cpp
9-
pdalc_pipeline.cpp
10-
pdalc_pointlayout.cpp
11-
pdalc_pointview.cpp
12-
pdalc_pointviewiterator.cpp
13-
)
7+
pdalc_config.cpp
8+
pdalc_dimtype.cpp
9+
pdalc_pipeline.cpp
10+
pdalc_pointlayout.cpp
11+
pdalc_pointview.cpp
12+
pdalc_pointviewiterator.cpp
13+
)
1414

1515
set(HEADERS
16-
pdalc.h
17-
pdalc_config.h
18-
pdalc_defines.h
19-
pdalc_dimtype.h
20-
pdalc_forward.h
21-
pdalc_pipeline.h
22-
pdalc_pointlayout.h
23-
pdalc_pointview.h
24-
pdalc_pointviewiterator.h
25-
)
16+
pdalc.h
17+
pdalc_config.h
18+
pdalc_defines.h
19+
pdalc_dimtype.h
20+
pdalc_forward.h
21+
pdalc_pipeline.h
22+
pdalc_pointlayout.h
23+
pdalc_pointview.h
24+
pdalc_pointviewiterator.h
25+
)
2626

2727
set(DEPENDENCIES
28-
${PDAL_LIBRARIES}
29-
)
28+
$ {PDAL_LIBRARIES}
29+
)
3030

3131
link_directories(
32-
${PDAL_LIBRARY_DIRS}
32+
$ {PDAL_LIBRARY_DIRS}
3333
)
3434

3535
include_directories(
36-
${PDAL_INCLUDE_DIRS}
36+
$ {PDAL_INCLUDE_DIRS}
3737
)
3838

39-
add_definitions(${PDAL_DEFINITIONS})
39+
add_definitions($ {PDAL_DEFINITIONS})
4040

41-
add_library(${TARGET} SHARED ${SOURCES} ${HEADERS})
41+
add_library($ {TARGET} SHARED $ {SOURCES} $ {HEADERS})
4242

4343
string(TOUPPER "${TARGET}_BUILD_DLL" BUILD_SYMBOL)
4444

45-
set_target_properties(${TARGET} PROPERTIES
46-
DEFINE_SYMBOL ${BUILD_SYMBOL}
47-
VERSION ${PDAL_VERSION}
48-
SOVERSION ${PDAL_VERSION}
49-
)
45+
set_target_properties($ {TARGET} PROPERTIES
46+
DEFINE_SYMBOL $ {BUILD_SYMBOL}
47+
VERSION $ {PDAL_VERSION}
48+
SOVERSION $ {PDAL_VERSION}
49+
)
5050

5151
# Measure code coverage on gcc
5252
if(CMAKE_COMPILER_IS_GNUCXX AND PDALC_ENABLE_CODE_COVERAGE AND PDALC_ENABLE_TESTS)
53-
SETUP_TARGET_FOR_COVERAGE(
54-
NAME coverage_${TARGET}
55-
EXECUTABLE test_${TARGET}
56-
DEPENDENCIES test_${TARGET}
57-
)
58-
endif()
53+
SETUP_TARGET_FOR_COVERAGE(
54+
NAME coverage_$ {TARGET}
55+
EXECUTABLE test_$ {TARGET}
56+
DEPENDENCIES test_$ {TARGET}
57+
)
58+
endif()
5959

60-
target_link_libraries(${TARGET} ${DEPENDENCIES})
60+
target_link_libraries($ {TARGET} $ {DEPENDENCIES})
6161

62-
install(TARGETS ${TARGET}
63-
ARCHIVE DESTINATION lib
64-
LIBRARY DESTINATION lib
65-
RUNTIME DESTINATION bin)
62+
install(TARGETS $ {TARGET}
63+
ARCHIVE DESTINATION lib
64+
LIBRARY DESTINATION lib
65+
RUNTIME DESTINATION bin)
6666

67-
file(RELATIVE_PATH ${TARGET}_PATH ${CMAKE_SOURCE_DIR}/source ${CMAKE_CURRENT_SOURCE_DIR})
68-
install(FILES ${HEADERS} DESTINATION include/${${TARGET}_PATH})
67+
file(RELATIVE_PATH $ {TARGET} _PATH $ {CMAKE_SOURCE_DIR}/source $ {CMAKE_CURRENT_SOURCE_DIR})
68+
install(FILES $ {HEADERS} DESTINATION include/$ {${TARGET} _PATH})

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())
44+
if (wrapper && wrapper->get())
45+
{
46+
try
4547
{
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-
}
48+
pdal::DimTypeList *list = wrapper->get();
49+
size = list->size();
5550
}
51+
catch (const std::exception &e)
52+
{
53+
printf("%s\n", e.what());
54+
}
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())
125+
if (wrapper && wrapper->get())
126+
{
127+
try
126128
{
127-
try
128-
{
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)
129+
pdal::DimTypeList *list = wrapper->get();
130+
131+
if (index < list->size())
141132
{
142-
printf("%s\n", e.what());
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;
143138
}
144139
}
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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ typedef struct PDALDimType PDALDimType;
8080
/// A dimension type
8181
struct PDALDimType
8282
{
83-
/// The dimension's identifier
84-
uint32_t id;
83+
/// The dimension's identifier
84+
uint32_t id;
8585

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

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

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

9696
/// A pointer to a dimension type list

0 commit comments

Comments
 (0)