Browse Source

*: removed redundant namespace names

Michele Caini 5 years ago
parent
commit
0d07d935bf

+ 2 - 2
src/entt/core/type_info.hpp

@@ -102,12 +102,12 @@ struct type_info {
      */
 #if defined ENTT_PRETTY_FUNCTION_CONSTEXPR
     [[nodiscard]] static constexpr id_type id() ENTT_NOEXCEPT {
-        constexpr auto value = entt::hashed_string::value(ENTT_PRETTY_FUNCTION);
+        constexpr auto value = hashed_string::value(ENTT_PRETTY_FUNCTION);
         return value;
     }
 #elif defined ENTT_PRETTY_FUNCTION
     [[nodiscard]] static id_type id() ENTT_NOEXCEPT {
-        static const auto value = entt::hashed_string::value(ENTT_PRETTY_FUNCTION);
+        static const auto value = hashed_string::value(ENTT_PRETTY_FUNCTION);
         return value;
     }
 #else

+ 1 - 1
src/entt/entity/actor.hpp

@@ -31,7 +31,7 @@ struct [[deprecated("Consider using the handle class instead")]] basic_actor {
     using entity_type = Entity;
 
     basic_actor() ENTT_NOEXCEPT
-        : entt{entt::null}, reg{nullptr}
+        : entt{null}, reg{nullptr}
     {}
 
     /**

+ 4 - 4
src/entt/entity/helper.hpp

@@ -21,7 +21,7 @@ namespace entt {
 template<bool Const, typename Entity>
 struct as_view {
     /*! @brief Type of registry to convert. */
-    using registry_type = std::conditional_t<Const, const entt::basic_registry<Entity>, entt::basic_registry<Entity>>;
+    using registry_type = std::conditional_t<Const, const basic_registry<Entity>, basic_registry<Entity>>;
 
     /**
      * @brief Constructs a converter for a given registry.
@@ -36,7 +36,7 @@ struct as_view {
      * @return A newly created view.
      */
     template<typename Exclude, typename... Component>
-    operator entt::basic_view<Entity, Exclude, Component...>() const {
+    operator basic_view<Entity, Exclude, Component...>() const {
         return reg.template view<Component...>(Exclude{});
     }
 
@@ -70,7 +70,7 @@ as_view(const basic_registry<Entity> &) ENTT_NOEXCEPT -> as_view<true, Entity>;
 template<bool Const, typename Entity>
 struct as_group {
     /*! @brief Type of registry to convert. */
-    using registry_type = std::conditional_t<Const, const entt::basic_registry<Entity>, entt::basic_registry<Entity>>;
+    using registry_type = std::conditional_t<Const, const basic_registry<Entity>, basic_registry<Entity>>;
 
     /**
      * @brief Constructs a converter for a given registry.
@@ -86,7 +86,7 @@ struct as_group {
      * @return A newly created group.
      */
     template<typename Exclude, typename Get, typename... Owned>
-    operator entt::basic_group<Entity, Exclude, Get, Owned...>() const {
+    operator basic_group<Entity, Exclude, Get, Owned...>() const {
         return reg.template group<Owned...>(Get{}, Exclude{});
     }
 

+ 11 - 11
src/entt/entity/registry.hpp

@@ -1192,14 +1192,14 @@ public:
      * @return A newly created view.
      */
     template<typename... Component, typename... Exclude>
-    [[nodiscard]] entt::basic_view<Entity, exclude_t<Exclude...>, Component...> view(exclude_t<Exclude...> = {}) const {
+    [[nodiscard]] basic_view<Entity, exclude_t<Exclude...>, Component...> view(exclude_t<Exclude...> = {}) const {
         static_assert(sizeof...(Component) > 0, "Exclusion-only views are not supported");
         return { assure<std::decay_t<Component>>()..., assure<Exclude>()... };
     }
 
     /*! @copydoc view */
     template<typename... Component, typename... Exclude>
-    [[nodiscard]] entt::basic_view<Entity, exclude_t<Exclude...>, Component...> view(exclude_t<Exclude...> = {}) {
+    [[nodiscard]] basic_view<Entity, exclude_t<Exclude...>, Component...> view(exclude_t<Exclude...> = {}) {
         static_assert(sizeof...(Component) > 0, "Exclusion-only views are not supported");
         return { assure<std::decay_t<Component>>()..., assure<Exclude>()... };
     }
@@ -1233,7 +1233,7 @@ public:
      * @return A newly created runtime view.
      */
     template<typename ItComp, typename ItExcl = id_type *>
-    [[nodiscard]] entt::basic_runtime_view<Entity> runtime_view(ItComp first, ItComp last, ItExcl from = {}, ItExcl to = {}) const {
+    [[nodiscard]] basic_runtime_view<Entity> runtime_view(ItComp first, ItComp last, ItExcl from = {}, ItExcl to = {}) const {
         std::vector<const sparse_set<Entity> *> component(std::distance(first, last));
         std::vector<const sparse_set<Entity> *> exclude(std::distance(from, to));
 
@@ -1278,7 +1278,7 @@ public:
      * @return A newly created group.
      */
     template<typename... Owned, typename... Get, typename... Exclude>
-    [[nodiscard]] entt::basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) {
+    [[nodiscard]] basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) {
         static_assert(sizeof...(Owned) + sizeof...(Get) > 0, "Exclusion-only views are not supported");
         static_assert(sizeof...(Owned) + sizeof...(Get) + sizeof...(Exclude) > 1, "Single component groups are not allowed");
 
@@ -1343,7 +1343,7 @@ public:
             (on_construct<Exclude>().before(discard_if).template connect<&handler_type::discard_if>(*handler), ...);
 
             if constexpr(sizeof...(Owned) == 0) {
-                for(const auto entity: view<Owned..., Get...>(entt::exclude<Exclude...>)) {
+                for(const auto entity: view<Owned..., Get...>(exclude<Exclude...>)) {
                     handler->current.emplace(entity);
                 }
             } else {
@@ -1372,9 +1372,9 @@ public:
      * @return A newly created group.
      */
     template<typename... Owned, typename... Get, typename... Exclude>
-    [[nodiscard]] entt::basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) const {
+    [[nodiscard]] basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> group(get_t<Get...>, exclude_t<Exclude...> = {}) const {
         static_assert(std::conjunction_v<std::is_const<Owned>..., std::is_const<Get>...>, "Invalid non-const type");
-        return const_cast<basic_registry *>(this)->group<Owned...>(entt::get<Get...>, exclude<Exclude...>);
+        return const_cast<basic_registry *>(this)->group<Owned...>(get_t<Get...>{}, exclude<Exclude...>);
     }
 
     /**
@@ -1387,8 +1387,8 @@ public:
      * @return A newly created group.
      */
     template<typename... Owned, typename... Exclude>
-    [[nodiscard]] entt::basic_group<Entity, exclude_t<Exclude...>, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) {
-        return group<Owned...>(entt::get<>, exclude<Exclude...>);
+    [[nodiscard]] basic_group<Entity, exclude_t<Exclude...>, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) {
+        return group<Owned...>(get_t<>{}, exclude<Exclude...>);
     }
 
     /**
@@ -1401,7 +1401,7 @@ public:
      * @return A newly created group.
      */
     template<typename... Owned, typename... Exclude>
-    [[nodiscard]] entt::basic_group<Entity, exclude_t<Exclude...>, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) const {
+    [[nodiscard]] basic_group<Entity, exclude_t<Exclude...>, get_t<>, Owned...> group(exclude_t<Exclude...> = {}) const {
         static_assert(std::conjunction_v<std::is_const<Owned>...>, "Invalid non-const type");
         return const_cast<basic_registry *>(this)->group<Owned...>(exclude<Exclude...>);
     }
@@ -1425,7 +1425,7 @@ public:
      * @return True if the group can be sorted, false otherwise.
      */
     template<typename... Owned, typename... Get, typename... Exclude>
-    [[nodiscard]] bool sortable(const entt::basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> &) ENTT_NOEXCEPT {
+    [[nodiscard]] bool sortable(const basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> &) ENTT_NOEXCEPT {
         constexpr auto size = sizeof...(Owned) + sizeof...(Get) + sizeof...(Exclude);
         return std::find_if(groups.cbegin(), groups.cend(), [size](const auto &gdata) {
             return (0u + ... + gdata.owned(type_info<std::decay_t<Owned>>::id())) && (size < gdata.size);

+ 2 - 2
src/entt/meta/factory.hpp

@@ -276,7 +276,7 @@ public:
      * @brief Constructs an extended factory from a given node.
      * @param target The underlying node to which to assign the properties.
      */
-    meta_factory(entt::internal::meta_prop_node **target) ENTT_NOEXCEPT
+    meta_factory(internal::meta_prop_node **target) ENTT_NOEXCEPT
         : curr{target}
     {}
 
@@ -319,7 +319,7 @@ public:
     }
 
 private:
-    entt::internal::meta_prop_node **curr;
+    internal::meta_prop_node **curr;
 };
 
 

+ 2 - 2
src/entt/meta/meta.hpp

@@ -1487,7 +1487,7 @@ public:
 private:
     void(* next_fn)(meta_any);
     meta_any(* get_fn)(meta_any);
-    entt::meta_any handle;
+    meta_any handle;
 };
 
 
@@ -1748,7 +1748,7 @@ private:
     void(* next_fn)(meta_any);
     meta_any(* key_fn)(meta_any);
     meta_any(* value_fn)(meta_any);
-    entt::meta_any handle;
+    meta_any handle;
 };
 
 

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -64,7 +64,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = std::size_t;
     /*! @brief Sink type. */
-    using sink_type = entt::sink<Ret(Args...)>;
+    using sink_type = sink<Ret(Args...)>;
 
     /**
      * @brief Instance type when it comes to connecting member functions.