@@ -65,36 +65,40 @@ namespace geode
6565 ObjectSets ( ObjectSets&& ) noexcept = default ;
6666 ObjectSets& operator =( ObjectSets&& ) noexcept = default ;
6767
68- const ObjectSet< Type >& get_set ( const uuid& set_id ) const ;
69- const Type& get_object ( const ObjectId& object_id ) const ;
70- std::vector< ObjectId > get_all_object () const ;
71- std::vector< ObjectId > get_objects_in_set ( const uuid& set_id ) const ;
72-
73- index_t nb_sets () const ;
74- index_t nb_objects_in_set ( const uuid& set_id ) const ;
75- index_t nb_objects () const ;
76-
77- uuid add_set ( std::string_view name );
78- ObjectId add_object ( Type&& object, const uuid& set_id, bool fixed );
79- void update_free_object ( const ObjectId& object_id, Type&& object );
80- void remove_free_object ( const ObjectId& object_id );
81-
82- std::vector< ObjectId > neighbors ( const Type& object,
68+ [[nodiscard]] const ObjectSet< Type >& get_set (
69+ const uuid& set_id ) const ;
70+ [[nodiscard]] const Type& get_object ( const ObjectId& object_id ) const ;
71+ [[nodiscard]] std::vector< ObjectId > get_all_object () const ;
72+ [[nodiscard]] std::vector< ObjectId > get_objects_in_set (
73+ const uuid& set_id ) const ;
74+
75+ [[nodiscard]] index_t nb_sets () const ;
76+ [[nodiscard]] index_t nb_objects_in_set ( const uuid& set_id ) const ;
77+ [[nodiscard]] index_t nb_objects () const ;
78+
79+ [[nodiscard]] uuid add_set ( std::string_view name );
80+ [[nodiscard]] ObjectId add_object (
81+ Type&& object, const uuid& set_id, bool fixed );
82+ [[nodiscard]] void update_free_object (
83+ const ObjectId& object_id, Type&& object );
84+ [[nodiscard]] void remove_free_object ( const ObjectId& object_id );
85+
86+ [[nodiscard]] std::vector< ObjectId > neighbors ( const Type& object,
8387 const std::vector< uuid >& targeted_set_ids,
8488 double searching_distance,
8589 std::optional< ObjectId > exclude_id ) const ;
8690
87- std::string string () const ;
91+ [[nodiscard]] std::string string () const ;
8892
89- uuid get_set_uuid ( std::string_view set_name ) const ;
90- std::vector< uuid > get_set_uuids (
93+ [[nodiscard]] uuid get_set_uuid ( std::string_view set_name ) const ;
94+ [[nodiscard]] std::vector< uuid > get_set_uuids (
9195 const std::vector< std::string >& set_names ) const ;
92- std::vector< std::pair< uuid, uuid > > get_set_uuid_pairs (
96+ [[nodiscard]] std::vector< std::pair< uuid, uuid > > get_set_uuid_pairs (
9397 const std::vector< std::pair< std::string, std::string > >&
9498 set_name_pairs ) const ;
9599
96100 private:
97- ObjectSet< Type >& get_set ( const uuid& set_id );
101+ [[nodiscard]] ObjectSet< Type >& get_set ( const uuid& set_id );
98102
99103 private:
100104 absl::flat_hash_map< std::string, uuid > name_to_uuid_;
0 commit comments