Ver Fonte

registry: mark functions [[nodiscard]] as needed

Michele Caini há 1 ano atrás
pai
commit
62e990ed8a
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/entt/entity/registry.hpp

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

@@ -1187,12 +1187,12 @@ public:
      * @brief Returns the context object, that is, a general purpose container.
      * @return The context object, that is, a general purpose container.
      */
-    context &ctx() noexcept {
+    [[nodiscard]] context &ctx() noexcept {
         return vars;
     }
 
     /*! @copydoc ctx */
-    const context &ctx() const noexcept {
+    [[nodiscard]] const context &ctx() const noexcept {
         return vars;
     }