Verified Commit 0c6311b2 authored by Marc Vef's avatar Marc Vef
Browse files

c++17 Using nested namespaces

parent 43112a9c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
#define ADD_PREFIX(str) CLIENT_ENV_PREFIX str

/* Environment variables for the GekkoFS client */
namespace gkfs {
namespace env {
namespace gkfs::env {

static constexpr auto LOG = ADD_PREFIX("LOG");

@@ -37,8 +36,7 @@ static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE");
static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE");
#endif

} // namespace env
} // namespace gkfs
} // namespace gkfs::env

#undef ADD_PREFIX

+2 −4
Original line number Diff line number Diff line
@@ -22,8 +22,7 @@ struct statvfs;
struct linux_dirent;
struct linux_dirent64;

namespace gkfs {
namespace syscall {
namespace gkfs::syscall {

int
gkfs_open(const std::string& path, mode_t mode, int flags);
@@ -134,7 +133,6 @@ gkfs_getdents64(unsigned int fd, struct linux_dirent64* dirp,
int
gkfs_rmdir(const std::string& path);

} // namespace syscall
} // namespace gkfs
} // namespace gkfs::syscall

#endif // GEKKOFS_GKFS_FUNCTIONS_HPP
+2 −4
Original line number Diff line number Diff line
@@ -14,8 +14,7 @@
#ifndef GEKKOFS_INTERCEPT_HPP
#define GEKKOFS_INTERCEPT_HPP

namespace gkfs {
namespace preload {
namespace gkfs::preload {

int
internal_hook_guard_wrapper(long syscall_number, long arg0, long arg1,
@@ -35,7 +34,6 @@ start_interception();
void
stop_interception();

} // namespace preload
} // namespace gkfs
} // namespace gkfs::preload

#endif
+2 −4
Original line number Diff line number Diff line
@@ -29,8 +29,7 @@
#include <bitset>
#endif

namespace gkfs {
namespace log {
namespace gkfs::log {

enum class log_level : short {
    print_syscalls = 1 << 0,
@@ -437,8 +436,7 @@ static_buffer::grow(std::size_t size) {
    abort();
}

} // namespace log
} // namespace gkfs
} // namespace gkfs::log

#define LOG(XXX, ...) LOG_##XXX(__VA_ARGS__)

+2 −4
Original line number Diff line number Diff line
@@ -16,8 +16,7 @@

#include <array>

namespace gkfs {
namespace util {
namespace gkfs::util {

template <typename... T>
constexpr auto
@@ -29,7 +28,6 @@ make_array(T&&... values) -> std::array<
            sizeof...(T)>{std::forward<T>(values)...};
}

} // namespace util
} // namespace gkfs
} // namespace gkfs::util

#endif // LIBGKFS_UTILS_MAKE_ARRAY_HPP
Loading