Browse Source

sparse_set: make ::policy [[nodiscard]]

Michele Caini 4 năm trước cách đây
mục cha
commit
71e85b44b0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/entt/entity/sparse_set.hpp

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

@@ -358,7 +358,7 @@ public:
      * @brief Returns the deletion policy of a sparse set.
      * @return The deletion policy of the sparse set.
      */
-    deletion_policy policy() const ENTT_NOEXCEPT {
+    [[nodiscard]] deletion_policy policy() const ENTT_NOEXCEPT {
         return mode;
     }