Skip to content

Commit c992f55

Browse files
author
Daniel Tobon
committed
added clang format style
1 parent 193908b commit c992f55

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

parser/include/modern/parser.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ class ParserFactory {
3232
class ParserCloudFile {
3333
public:
3434
ParserFactory parser_factory;
35-
ParserCloudFile(){
35+
ParserCloudFile() {
3636
parser_factory.register_format("PCD", new ParserPCD());
3737
parser_factory.register_format("PLY", new ParserPLY());
38-
}
38+
}
3939
void load_cloudfile(std::string filename, pcl::PointCloud<pcl::PointXYZRGB>::Ptr &cloud) {
4040
int position = filename.find_last_of(".");
4141
std::string extension = filename.substr(position + 1);

parser/parser.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ void ParserFactory::register_format(std::string format, InterfaceParser* ptr) {
66
ParserFactory::factories[format] = ptr;
77
}
88

9-
size_t ParserFactory::get_size() {
10-
return factories.size();
11-
}
9+
size_t ParserFactory::get_size() { return factories.size(); }
1210

1311
InterfaceParser* ParserFactory::get_parser(const std::string format) {
1412
try {

tests/test_parser.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
#include <modern/parser.hpp>
44

55
TEST_CASE("Testing register_format and get_parser") {
6-
CloudParserLibrary::ParserFactory parser_factory;
7-
CloudParserLibrary::ParserPCD* pcd_parser = new CloudParserLibrary::ParserPCD();
6+
CloudParserLibrary::ParserFactory parser_factory;
7+
CloudParserLibrary::ParserPCD* pcd_parser = new CloudParserLibrary::ParserPCD();
88

9-
SECTION("Registering a new parser into the factories map") {
10-
parser_factory.register_format("PCD", pcd_parser);
11-
REQUIRE(parser_factory.get_size() == 1);
9+
SECTION("Registering a new parser into the factories map") {
10+
parser_factory.register_format("PCD", pcd_parser);
11+
REQUIRE(parser_factory.get_size() == 1);
1212

13-
SECTION("Searches the container for the factory parser") {
14-
CloudParserLibrary::InterfaceParser* factory = parser_factory.get_parser("PCD");
15-
REQUIRE(factory == pcd_parser);
16-
}
17-
}
13+
SECTION("Searches the container for the factory parser") {
14+
CloudParserLibrary::InterfaceParser* factory = parser_factory.get_parser("PCD");
15+
REQUIRE(factory == pcd_parser);
16+
}
17+
}
1818
}

0 commit comments

Comments
 (0)