Browse Source

Merge pull request #10666 from neikeq/methodinfo-opequal

MethodBind: Adds operator== to compare by id
Rémi Verschelde 8 năm trước cách đây
mục cha
commit
1a3e524d5b
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      core/object.h

+ 1 - 0
core/object.h

@@ -185,6 +185,7 @@ struct MethodInfo {
 	uint32_t flags;
 	int id;
 
+	inline bool operator==(const MethodInfo &p_method) const { return id == p_method.id; }
 	inline bool operator<(const MethodInfo &p_method) const { return id == p_method.id ? (name < p_method.name) : (id < p_method.id); }
 
 	operator Dictionary() const;