Explorar el Código

Merge pull request #34875 from neikeq/api-hash-no-underscore-methodbinds

ClassDB: Exclude method binds starting with '_' from API hash
Rémi Verschelde hace 5 años
padre
commit
14b24b6a71
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      core/class_db.cpp

+ 7 - 0
core/class_db.cpp

@@ -389,6 +389,13 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
 
 			while ((k = t->method_map.next(k))) {
 
+				String name = k->operator String();
+
+				ERR_CONTINUE(name.empty());
+
+				if (name[0] == '_')
+					continue; // Ignore non-virtual methods that start with an underscore
+
 				snames.push_back(*k);
 			}