diff options
Diffstat (limited to 'core/io')
| -rw-r--r-- | core/io/dir_access.h | 4 | ||||
| -rw-r--r-- | core/io/file_access.h | 4 | ||||
| -rw-r--r-- | core/io/image.cpp | 2 | ||||
| -rw-r--r-- | core/io/ip.cpp | 2 | ||||
| -rw-r--r-- | core/io/json.cpp | 2 | ||||
| -rw-r--r-- | core/io/resource_format_binary.cpp | 5 | ||||
| -rw-r--r-- | core/io/resource_loader.h | 2 | ||||
| -rw-r--r-- | core/io/translation_loader_po.cpp | 3 |
8 files changed, 14 insertions, 10 deletions
diff --git a/core/io/dir_access.h b/core/io/dir_access.h index e9c864c56b..54e5ddf729 100644 --- a/core/io/dir_access.h +++ b/core/io/dir_access.h @@ -96,8 +96,8 @@ public: virtual bool file_exists(String p_file) = 0; virtual bool dir_exists(String p_dir) = 0; - virtual bool is_readable(String p_dir) { return true; }; - virtual bool is_writable(String p_dir) { return true; }; + virtual bool is_readable(String p_dir) { return true; } + virtual bool is_writable(String p_dir) { return true; } static bool exists(const String &p_dir); virtual uint64_t get_space_left() = 0; diff --git a/core/io/file_access.h b/core/io/file_access.h index 2f4d1a8604..7f5687fe03 100644 --- a/core/io/file_access.h +++ b/core/io/file_access.h @@ -215,8 +215,8 @@ public: static bool get_read_only_attribute(const String &p_file); static Error set_read_only_attribute(const String &p_file, bool p_ro); - static void set_backup_save(bool p_enable) { backup_save = p_enable; }; - static bool is_backup_save_enabled() { return backup_save; }; + static void set_backup_save(bool p_enable) { backup_save = p_enable; } + static bool is_backup_save_enabled() { return backup_save; } static String get_md5(const String &p_file); static String get_sha256(const String &p_file); diff --git a/core/io/image.cpp b/core/io/image.cpp index aa391b77dd..d782af931f 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2751,7 +2751,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels case COMPRESS_S3TC: { // BC3 is unsupported currently. - if ((p_channels == USED_CHANNELS_RGB || p_channels == USED_CHANNELS_L) && _image_compress_bc_rd_func) { + if ((p_channels == USED_CHANNELS_R || p_channels == USED_CHANNELS_RGB || p_channels == USED_CHANNELS_L) && _image_compress_bc_rd_func) { Error result = _image_compress_bc_rd_func(this, p_channels); // If the image was compressed successfully, we return here. If not, we fall back to the default compression scheme. diff --git a/core/io/ip.cpp b/core/io/ip.cpp index 38c71b19fa..aa71ad04d0 100644 --- a/core/io/ip.cpp +++ b/core/io/ip.cpp @@ -51,7 +51,7 @@ struct _IP_ResolverPrivate { response.clear(); type = IP::TYPE_NONE; hostname = ""; - }; + } QueueItem() { clear(); diff --git a/core/io/json.cpp b/core/io/json.cpp index 664ff7857b..22219fca29 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -121,7 +121,7 @@ String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_ d.get_key_list(&keys); if (p_sort_keys) { - keys.sort(); + keys.sort_custom<StringLikeVariantOrder>(); } bool first_key = true; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 109999d612..ecbb9c0104 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1268,6 +1268,11 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String return; } + // res files not supported for GDExtension. + if (p_type == "GDExtension") { + return; + } + List<String> extensions; ClassDB::get_extensions_for_type(p_type, &extensions); diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index caaf9f8f45..0d802ed1f4 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -222,7 +222,7 @@ public: static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr); static Ref<Resource> load_threaded_get(const String &p_path, Error *r_error = nullptr); - static bool is_within_load() { return load_nesting > 0; }; + static bool is_within_load() { return load_nesting > 0; } static void resource_changed_connect(Resource *p_source, const Callable &p_callable, uint32_t p_flags); static void resource_changed_disconnect(Resource *p_source, const Callable &p_callable); diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index 578cd91c52..812fbc774e 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -31,7 +31,6 @@ #include "translation_loader_po.h" #include "core/io/file_access.h" -#include "core/string/translation.h" #include "core/string/translation_po.h" Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { @@ -361,7 +360,7 @@ void TranslationLoaderPO::get_recognized_extensions(List<String> *p_extensions) } bool TranslationLoaderPO::handles_type(const String &p_type) const { - return (p_type == "Translation"); + return (p_type == "Translation") || (p_type == "TranslationPO"); } String TranslationLoaderPO::get_resource_type(const String &p_path) const { |
