@@ -46,13 +46,14 @@ namespace capi
4646
4747extern " C"
4848{
49- struct Pipeline {
50- public:
49+ struct Pipeline
50+ {
51+ public:
5152
52- PipelineManagerPtr manager = std::make_unique<PipelineManager>();
53+ PipelineManagerPtr manager = std::make_unique<PipelineManager>();
5354
54- bool m_executed = false ;
55- std::stringstream logStream;
55+ bool m_executed = false ;
56+ std::stringstream logStream;
5657 };
5758
5859 PDALPipelinePtr PDALCreatePipeline (const char * json)
@@ -113,9 +114,9 @@ extern "C"
113114
114115 try
115116 {
116- if ( ! ptr->m_executed )
117+ if (! ptr->m_executed )
117118 throw pdal_error (" Pipeline has not been executed!" );
118-
119+
119120 std::stringstream strm;
120121 pdal::PipelineWriter::writePipeline (ptr->manager ->getStage (), strm);
121122 std::strncpy (buffer, strm.str ().c_str (), size - 1 );
@@ -142,9 +143,9 @@ extern "C"
142143
143144 try
144145 {
145- if ( ! ptr->m_executed )
146+ if (! ptr->m_executed )
146147 throw pdal_error (" Pipeline has not been executed!" );
147-
148+
148149 std::stringstream strm;
149150 MetadataNode root = ptr->manager ->getMetadata ().clone (" metadata" );
150151 pdal::Utils::toJSON (root, strm);
@@ -217,8 +218,8 @@ extern "C"
217218 {
218219 Pipeline *ptr = reinterpret_cast <Pipeline *>(pipeline);
219220
220- try
221- {
221+ try
222+ {
222223 if (level < 0 || level > 8 )
223224 throw pdal_error (" log level must be between 0 and 8!" );
224225
@@ -227,7 +228,7 @@ extern "C"
227228 }
228229 catch (const std::exception &e)
229230 {
230- printf (" Found error while setting log level: %s\n " , e.what ());
231+ printf (" Found error while setting log level: %s\n " , e.what ());
231232 }
232233
233234 }
@@ -237,13 +238,15 @@ extern "C"
237238 Pipeline *ptr = reinterpret_cast <Pipeline *>(pipeline);
238239 try
239240 {
240- return (ptr)
241- ? static_cast <int >(
242- ptr->manager ->log ()->getLevel ()
243- ) : 0 ;
241+ return (ptr)
242+ ? static_cast <int >(
243+ ptr->manager ->log ()->getLevel ()
244+ ) : 0 ;
244245 }
245246 catch (const std::exception &e)
246- {printf (" Found error while getting log level: %s\n " , e.what ()); }
247+ {
248+ printf (" Found error while getting log level: %s\n " , e.what ());
249+ }
247250 return 0 ;
248251 }
249252
0 commit comments