summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2022-12-12 15:14:39 +0000
committerlawnjelly <lawnjelly@gmail.com>2022-12-12 15:14:39 +0000
commit491594ef0f56dcafd9a1aaba7b66ec23c9f18af4 (patch)
tree8f0b408b29a1d3c5cb9820b9d84d9096305a2894 /scene
parentbc5d67c61345758741fe087c6b5282402b0b2465 (diff)
VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync. This PR makes the VariantParser readahead to be optional to allow for these use cases.
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/resource_format_text.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 36e4a8ea37..e871ca007c 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -836,7 +836,8 @@ void ResourceLoaderText::set_translation_remapped(bool p_remapped) {
translation_remapped = p_remapped;
}
-ResourceLoaderText::ResourceLoaderText() {}
+ResourceLoaderText::ResourceLoaderText() :
+ stream(false) {}
void ResourceLoaderText::get_dependencies(Ref<FileAccess> p_f, List<String> *p_dependencies, bool p_add_types) {
open(p_f);