소스 검색

minor changes

Michele Caini 8 년 전
부모
커밋
1e3723b8bb
8개의 변경된 파일14개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 1
      .gitignore
  2. 1 0
      CMakeLists.txt
  3. 1 0
      src/entt/core/hashed_string.hpp
  4. 2 0
      src/entt/entity/actor.hpp
  5. 3 3
      src/entt/entity/entt_traits.hpp
  6. 1 1
      src/entt/entity/registry.hpp
  7. 4 4
      src/entt/entity/sparse_set.hpp
  8. 1 1
      src/entt/entt.hpp

+ 1 - 1
.gitignore

@@ -1,2 +1,2 @@
-# QtCreator
 *.user
 *.user
+TODO

+ 1 - 0
CMakeLists.txt

@@ -106,5 +106,6 @@ add_custom_target(
         AUTHORS
         AUTHORS
         LICENSE
         LICENSE
         README.md
         README.md
+        TODO
         .travis.yml
         .travis.yml
 )
 )

+ 1 - 0
src/entt/core/hashed_string.hpp

@@ -2,6 +2,7 @@
 #define ENTT_CORE_HASHED_STRING_HPP
 #define ENTT_CORE_HASHED_STRING_HPP
 
 
 
 
+#include <cstddef>
 #include <cstdint>
 #include <cstdint>
 
 
 
 

+ 2 - 0
src/entt/entity/actor.hpp

@@ -22,6 +22,8 @@ template<typename Entity, typename Delta>
 struct Actor {
 struct Actor {
     /*! @brief Type of registry used internally. */
     /*! @brief Type of registry used internally. */
     using registry_type = Registry<Entity>;
     using registry_type = Registry<Entity>;
+    /*! @brief Underlying entity identifier. */
+    using entity_type = Entity;
     /*! @brief Type used to provide elapsed time. */
     /*! @brief Type used to provide elapsed time. */
     using delta_type = Delta;
     using delta_type = Delta;
 
 

+ 3 - 3
src/entt/entity/traits.hpp → src/entt/entity/entt_traits.hpp

@@ -1,5 +1,5 @@
-#ifndef ENTT_ENTITY_ENTT_HPP
-#define ENTT_ENTITY_ENTT_HPP
+#ifndef ENTT_ENTITY_ENTT_TRAITS_HPP
+#define ENTT_ENTITY_ENTT_TRAITS_HPP
 
 
 
 
 #include <cstdint>
 #include <cstdint>
@@ -93,4 +93,4 @@ struct entt_traits<std::uint64_t> {
 }
 }
 
 
 
 
-#endif // ENTT_ENTITY_ENTT_HPP
+#endif // ENTT_ENTITY_ENTT_TRAITS_HPP

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

@@ -12,8 +12,8 @@
 #include <algorithm>
 #include <algorithm>
 #include <type_traits>
 #include <type_traits>
 #include "../core/family.hpp"
 #include "../core/family.hpp"
+#include "entt_traits.hpp"
 #include "sparse_set.hpp"
 #include "sparse_set.hpp"
-#include "traits.hpp"
 #include "view.hpp"
 #include "view.hpp"
 
 
 
 

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

@@ -9,7 +9,7 @@
 #include <cstddef>
 #include <cstddef>
 #include <cassert>
 #include <cassert>
 #include <type_traits>
 #include <type_traits>
-#include "traits.hpp"
+#include "entt_traits.hpp"
 
 
 
 
 namespace entt {
 namespace entt {
@@ -56,10 +56,10 @@ template<typename Entity>
 class SparseSet<Entity> {
 class SparseSet<Entity> {
     using traits_type = entt_traits<Entity>;
     using traits_type = entt_traits<Entity>;
 
 
-    struct Iterator {
+    struct Iterator final {
         using value_type = Entity;
         using value_type = Entity;
 
 
-        Iterator(const std::vector<Entity> *direct, std::size_t pos)
+        Iterator(const std::vector<value_type> *direct, std::size_t pos)
             : direct{direct}, pos{pos}
             : direct{direct}, pos{pos}
         {}
         {}
 
 
@@ -85,7 +85,7 @@ class SparseSet<Entity> {
         }
         }
 
 
     private:
     private:
-        const std::vector<Entity> *direct;
+        const std::vector<value_type> *direct;
         std::size_t pos;
         std::size_t pos;
     };
     };
 
 

+ 1 - 1
src/entt/entt.hpp

@@ -2,9 +2,9 @@
 #include "core/hashed_string.hpp"
 #include "core/hashed_string.hpp"
 #include "core/ident.hpp"
 #include "core/ident.hpp"
 #include "entity/actor.hpp"
 #include "entity/actor.hpp"
+#include "entity/entt_traits.hpp"
 #include "entity/registry.hpp"
 #include "entity/registry.hpp"
 #include "entity/sparse_set.hpp"
 #include "entity/sparse_set.hpp"
-#include "entity/traits.hpp"
 #include "entity/view.hpp"
 #include "entity/view.hpp"
 #include "locator/locator.hpp"
 #include "locator/locator.hpp"
 #include "process/process.hpp"
 #include "process/process.hpp"