General: Convert multiple namespace specifiers to nested namespace specifiers where applicable

Makes namespacing a little less noisy
This commit is contained in:
Lioncash 2018-01-26 08:51:48 -05:00 committed by MerryMage
parent 7abd673a49
commit 67443efb62
130 changed files with 264 additions and 532 deletions

View file

@ -8,8 +8,7 @@
#include "common/common_types.h"
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
struct AddressRange {
u32 start_address;
@ -21,5 +20,4 @@ struct AddressRange {
}
};
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -13,8 +13,7 @@
#include "common/assert.h"
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
/// The size of a type in terms of bits
template<typename T>
@ -135,5 +134,4 @@ inline T RotateRight(T value, size_t amount) {
return static_cast<T>((x >> amount) | (x << (BitSize<T>() - amount)));
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -13,8 +13,7 @@
#include "common/assert.h"
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
template <typename T> class IntrusiveList;
template <typename T> class IntrusiveListIterator;
@ -374,5 +373,4 @@ void swap(IntrusiveList<T>& lhs, IntrusiveList<T>& rhs) noexcept {
lhs.swap(rhs);
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -8,9 +8,7 @@
#include <iterator>
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
namespace detail {
template<typename T>
@ -35,5 +33,4 @@ detail::ReverseAdapter<T> Reverse(T&& iterable) {
return detail::ReverseAdapter<T>{iterable};
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -8,8 +8,7 @@
#include "common/memory_pool.h"
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
Pool::Pool(size_t object_size, size_t initial_pool_size) : object_size(object_size), slab_size(initial_pool_size) {
AllocateNewSlab();
@ -42,6 +41,4 @@ void Pool::AllocateNewSlab() {
remaining = slab_size;
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -9,8 +9,7 @@
#include <cstddef>
#include <vector>
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
class Pool {
public:
@ -44,5 +43,4 @@ private:
std::vector<char*> slabs;
};
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -9,8 +9,7 @@
#include <cstddef>
#include <tuple>
namespace Dynarmic {
namespace mp {
namespace Dynarmic::mp {
/// Used to provide information about an arbitrary function.
template <typename Function>
@ -80,5 +79,4 @@ using return_type_t = typename FunctionInfo<Function>::return_type;
template <typename Function>
using class_type_t = typename FunctionInfo<Function>::class_type;
} // namespace mp
} // namespace Dynarmic
} // namespace Dynarmic::mp

View file

@ -6,13 +6,11 @@
#pragma once
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
template <typename T>
constexpr char SignToChar(T value) {
return value >= 0 ? '+' : '-';
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common

View file

@ -8,9 +8,7 @@
#include <boost/variant.hpp>
namespace Dynarmic {
namespace Common {
namespace Dynarmic::Common {
namespace detail {
template <typename ReturnT, typename Lambda>
@ -29,5 +27,4 @@ inline ReturnT VisitVariant(Variant&& variant, Lambda&& lambda) {
return boost::apply_visitor(detail::VariantVisitor<ReturnT, Lambda>(std::move(lambda)), variant);
}
} // namespace Common
} // namespace Dynarmic
} // namespace Dynarmic::Common