diff options
Diffstat (limited to 'core/io/resource_saver.cpp')
-rw-r--r-- | core/io/resource_saver.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index 51020a0285..8d78ecabbf 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -39,30 +39,30 @@ bool ResourceSaver::timestamp_on_save=false; ResourceSavedCallback ResourceSaver::save_callback=0; Error ResourceSaver::save(const String &p_path,const RES& p_resource,uint32_t p_flags) { - + String extension=p_path.extension(); Error err=ERR_FILE_UNRECOGNIZED; for (int i=0;i<saver_count;i++) { - + if (!saver[i]->recognize(p_resource)) continue; - + List<String> extensions; bool recognized=false; saver[i]->get_recognized_extensions(p_resource,&extensions); - + for (List<String>::Element *E=extensions.front();E;E=E->next()) { - + if (E->get().nocasecmp_to(extension.extension())==0) recognized=true; } if (!recognized) continue; - + String old_path=p_resource->get_path(); - + String local_path=Globals::get_singleton()->localize_path(p_path); @@ -92,10 +92,10 @@ Error ResourceSaver::save(const String &p_path,const RES& p_resource,uint32_t p_ return OK; } else { - + } } - + return err; } @@ -108,16 +108,16 @@ void ResourceSaver::set_save_callback(ResourceSavedCallback p_callback) { void ResourceSaver::get_recognized_extensions(const RES& p_resource,List<String> *p_extensions) { - + for (int i=0;i<saver_count;i++) { - + saver[i]->get_recognized_extensions(p_resource,p_extensions); } - + } void ResourceSaver::add_resource_format_saver(ResourceFormatSaver *p_format_saver) { - + ERR_FAIL_COND( saver_count >= MAX_SAVERS ); saver[saver_count++]=p_format_saver; } |