diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/file_access_zip.cpp | 6 | ||||
-rw-r--r-- | core/io/marshalls.cpp | 6 | ||||
-rw-r--r-- | core/io/resource_format_binary.cpp | 15 | ||||
-rw-r--r-- | core/io/resource_loader.cpp | 6 | ||||
-rw-r--r-- | core/io/resource_saver.cpp | 6 |
5 files changed, 19 insertions, 20 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index 66b911e83c..be28c9a877 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -168,10 +168,10 @@ bool ZipArchive::try_open_pack(const String &p_path) { zlib_filefunc_def io; - FileAccess *f = FileAccess::open(p_path, FileAccess::READ); - if (!f) + FileAccess *fa = FileAccess::open(p_path, FileAccess::READ); + if (!fa) return false; - io.opaque = f; + io.opaque = fa; io.zopen_file = godot_open; io.zread_file = godot_read; io.zwrite_file = godot_write; diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index eec1c55744..5087a63b68 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -889,11 +889,11 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo if (buf) { encode_uint32(uint32_t(np.get_name_count()) | 0x80000000, buf); //for compatibility with the old format encode_uint32(np.get_subname_count(), buf + 4); - uint32_t flags = 0; + uint32_t np_flags = 0; if (np.is_absolute()) - flags |= 1; + np_flags |= 1; - encode_uint32(flags, buf + 8); + encode_uint32(np_flags, buf + 8); buf += 12; } diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 4d4134b745..77e3efb3a0 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -296,9 +296,9 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { } break; case VARIANT_OBJECT: { - uint32_t type = f->get_32(); + uint32_t objtype = f->get_32(); - switch (type) { + switch (objtype) { case OBJECT_EMPTY: { //do none @@ -317,7 +317,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { case OBJECT_EXTERNAL_RESOURCE: { //old file format, still around for compatibility - String type = get_unicode_string(); + String exttype = get_unicode_string(); String path = get_unicode_string(); if (path.find("://") == -1 && path.is_rel_path()) { @@ -329,7 +329,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { path = remaps[path]; } - RES res = ResourceLoader::load(path, type); + RES res = ResourceLoader::load(path, exttype); if (res.is_null()) { WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data()); @@ -346,7 +346,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { r_v = Variant(); } else { - String type = external_resources[erindex].type; + String exttype = external_resources[erindex].type; String path = external_resources[erindex].path; if (path.find("://") == -1 && path.is_rel_path()) { @@ -354,7 +354,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path)); } - RES res = ResourceLoader::load(path, type); + RES res = ResourceLoader::load(path, exttype); if (res.is_null()) { WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data()); @@ -1314,8 +1314,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia } else { f->store_32(VARIANT_INT); - int val = p_property; - f->store_32(int32_t(val)); + f->store_32(int32_t(p_property)); } } break; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 10a32bae41..98309048bb 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -905,9 +905,9 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) { void ResourceLoader::remove_custom_resource_format_loader(String script_path) { - Ref<ResourceFormatLoader> loader = _find_custom_resource_format_loader(script_path); - if (loader.is_valid()) - remove_resource_format_loader(loader); + Ref<ResourceFormatLoader> custom_loader = _find_custom_resource_format_loader(script_path); + if (custom_loader.is_valid()) + remove_resource_format_loader(custom_loader); } void ResourceLoader::add_custom_loaders() { diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index 279788796c..c992e2bf94 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -233,9 +233,9 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) { void ResourceSaver::remove_custom_resource_format_saver(String script_path) { - Ref<ResourceFormatSaver> saver = _find_custom_resource_format_saver(script_path); - if (saver.is_valid()) - remove_resource_format_saver(saver); + Ref<ResourceFormatSaver> custom_saver = _find_custom_resource_format_saver(script_path); + if (custom_saver.is_valid()) + remove_resource_format_saver(custom_saver); } void ResourceSaver::add_custom_savers() { |