summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-17 14:22:48 +0100
committerGitHub <noreply@github.com>2017-12-17 14:22:48 +0100
commitd0abcf1a58a587b9aa30db016d349db63f0130ea (patch)
treed34b95f7fec67b522ef582201c1d6a33ebb9377d /core
parente2583233d151c235e9d25a43a0c0d179d9a8fd10 (diff)
parentb17ae020bb2adecec7834b15a2e6eb370dff77c0 (diff)
Merge pull request #14745 from poke1024/api-hash-arg-info
Faster ClassDB::get_api_hash()
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index edd49fe95f..b18e3d2b65 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -348,10 +348,11 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
hash = hash_djb2_one_64(mb->get_argument_type(-1), hash); //return
for (int i = 0; i < mb->get_argument_count(); i++) {
- hash = hash_djb2_one_64(mb->get_argument_info(i).type, hash);
- hash = hash_djb2_one_64(mb->get_argument_info(i).name.hash(), hash);
- hash = hash_djb2_one_64(mb->get_argument_info(i).hint, hash);
- hash = hash_djb2_one_64(mb->get_argument_info(i).hint_string.hash(), hash);
+ const PropertyInfo info = mb->get_argument_info(i);
+ hash = hash_djb2_one_64(info.type, hash);
+ hash = hash_djb2_one_64(info.name.hash(), hash);
+ hash = hash_djb2_one_64(info.hint, hash);
+ hash = hash_djb2_one_64(info.hint_string.hash(), hash);
}
hash = hash_djb2_one_64(mb->get_default_argument_count(), hash);