Skip to content

Commit 5991844

Browse files
authored
Merge pull request #2096 from joto/modernize-ns
Refactor: Modernize code, use nested namespace definition
2 parents 7259990 + 90ac2c1 commit 5991844

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

tests/common-cleanup.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
#include <boost/filesystem.hpp>
1818

19-
namespace testing {
20-
namespace cleanup {
19+
namespace testing::cleanup {
2120

2221
/**
2322
* RAII structure to remove a file upon destruction.
@@ -56,7 +55,6 @@ class file_t
5655
std::string m_filename;
5756
};
5857

59-
} // namespace cleanup
60-
} // namespace testing
58+
} // namespace testing::cleanup
6159

6260
#endif // OSM2PGSQL_TESTS_COMMON_CLEANUP_HPP

tests/common-pg.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
#include <unistd.h>
3131
#endif
3232

33-
namespace testing {
3433
/// Helper classes for postgres connections
35-
namespace pg {
34+
namespace testing::pg {
3635

3736
class conn_t : public pg_conn_t
3837
{
@@ -153,7 +152,6 @@ class tempdb_t
153152
std::string m_db_name;
154153
};
155154

156-
} // namespace pg
157-
} // namespace testing
155+
} // namespace testing::pg
158156

159157
#endif // OSM2PGSQL_TESTS_COMMON_PG_HPP

0 commit comments

Comments
 (0)