diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 08:53:31 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 08:54:17 -0300 |
commit | e6583117df95373cffb12105de82d3816ca09f85 (patch) | |
tree | 9953c32a4b50db9cc99d0999c7904a27748a0ace /core/io/resource_format_binary.cpp | |
parent | 57166cd2923cc6d32b37c34f6ca2f32f6941e4a8 (diff) | |
download | redot-engine-e6583117df95373cffb12105de82d3816ca09f85.tar.gz |
Both Array and Dictionary are always in shared mode (removed copy on write).
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r-- | core/io/resource_format_binary.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 7383fd7f6d..c093b087b8 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -426,7 +426,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant& r_v) { case VARIANT_DICTIONARY: { uint32_t len=f->get_32(); - Dictionary d(len&0x80000000); //last bit means shared + Dictionary d; //last bit means shared len&=0x7FFFFFFF; for(uint32_t i=0;i<len;i++) { Variant key; @@ -442,7 +442,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant& r_v) { case VARIANT_ARRAY: { uint32_t len=f->get_32(); - Array a(len&0x80000000); //last bit means shared + Array a; //last bit means shared len&=0x7FFFFFFF; a.resize(len); for(uint32_t i=0;i<len;i++) { @@ -1701,7 +1701,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property, f->store_32(VARIANT_DICTIONARY); Dictionary d = p_property; - f->store_32(uint32_t(d.size())|(d.is_shared()?0x80000000:0)); + f->store_32(uint32_t(d.size())); List<Variant> keys; d.get_key_list(&keys); @@ -1721,7 +1721,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property, f->store_32(VARIANT_ARRAY); Array a=p_property; - f->store_32(uint32_t(a.size())|(a.is_shared()?0x80000000:0)); + f->store_32(uint32_t(a.size())); for(int i=0;i<a.size();i++) { write_variant(a[i]); |