summaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 12790a6746..40ded6872a 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -234,15 +234,15 @@ static bool _is_built_in_script(Script *p_script) {
class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache {
struct Cache {
- uint64_t time_loaded;
+ uint64_t time_loaded = 0;
RES cache;
};
Map<String, Cache> cached;
public:
- uint64_t max_time_cache;
- int max_cache_size;
+ uint64_t max_time_cache = 5 * 60 * 1000; //minutes, five
+ int max_cache_size = 128;
void cleanup() {
List<Map<String, Cache>::Element *> to_clean;
@@ -292,11 +292,6 @@ public:
return E->get().cache;
}
- EditorScriptCodeCompletionCache() {
- max_cache_size = 128;
- max_time_cache = 5 * 60 * 1000; //minutes, five
- }
-
virtual ~EditorScriptCodeCompletionCache() {}
};
@@ -1723,11 +1718,11 @@ struct _ScriptEditorItemData {
String name;
String sort_key;
Ref<Texture2D> icon;
- int index;
+ int index = 0;
String tooltip;
- bool used;
- int category;
- Node *ref;
+ bool used = false;
+ int category = 0;
+ Node *ref = nullptr;
bool operator<(const _ScriptEditorItemData &id) const {
if (category == id.category) {