浏览代码

MethodBind: Adds operator== to compare by id

Ignacio Etcheverry 8 年之前
父节点
当前提交
b50a937fe6
共有 1 个文件被更改,包括 1 次插入0 次删除
  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;