rename String.extension() -> String.get_extension() / String.basename() -> String.get_basename()
This commit is contained in:
parent
f3b6177ece
commit
d9d77291bc
51 changed files with 113 additions and 113 deletions
|
|
@ -785,7 +785,7 @@ RES ResourceFormatLoaderChibi::load(const String &p_path, const String& p_origin
|
|||
|
||||
if (r_error)
|
||||
*r_error=ERR_FILE_CANT_OPEN;
|
||||
String el = p_path.extension().to_lower();
|
||||
String el = p_path.get_extension().to_lower();
|
||||
|
||||
CPFileAccessWrapperImpl f;
|
||||
|
||||
|
|
@ -849,7 +849,7 @@ bool ResourceFormatLoaderChibi::handles_type(const String& p_type) const {
|
|||
}
|
||||
|
||||
String ResourceFormatLoaderChibi::get_resource_type(const String &p_path) const {
|
||||
String el = p_path.extension().to_lower();
|
||||
String el = p_path.get_extension().to_lower();
|
||||
if (el=="it" || el=="s3m" || el=="xm" || el=="mod")
|
||||
return "EventStreamChibi";
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ bool ResourceFormatDDS::handles_type(const String& p_type) const {
|
|||
|
||||
String ResourceFormatDDS::get_resource_type(const String &p_path) const {
|
||||
|
||||
if (p_path.extension().to_lower()=="dds")
|
||||
if (p_path.get_extension().to_lower()=="dds")
|
||||
return "ImageTexture";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ bool ResourceFormatPKM::handles_type(const String& p_type) const {
|
|||
|
||||
String ResourceFormatPKM::get_resource_type(const String &p_path) const {
|
||||
|
||||
if (p_path.extension().to_lower()=="pkm")
|
||||
if (p_path.get_extension().to_lower()=="pkm")
|
||||
return "ImageTexture";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
|
|||
if (!script.ends_with(".gd")) {
|
||||
//not a script, try find the script anyway,
|
||||
//may have some success
|
||||
script=script.basename()+".gd";
|
||||
script=script.get_basename()+".gd";
|
||||
}
|
||||
|
||||
if (FileAccess::exists(script)) {
|
||||
|
|
@ -1168,7 +1168,7 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const
|
|||
if (!script.ends_with(".gd")) {
|
||||
//not a script, try find the script anyway,
|
||||
//may have some success
|
||||
script=script.basename()+".gd";
|
||||
script=script.get_basename()+".gd";
|
||||
}
|
||||
|
||||
if (FileAccess::exists(script)) {
|
||||
|
|
@ -2832,7 +2832,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
|
|||
if (!script.ends_with(".gd")) {
|
||||
//not a script, try find the script anyway,
|
||||
//may have some success
|
||||
script=script.basename()+".gd";
|
||||
script=script.get_basename()+".gd";
|
||||
}
|
||||
|
||||
if (FileAccess::exists(script)) {
|
||||
|
|
|
|||
|
|
@ -2068,7 +2068,7 @@ bool ResourceFormatLoaderGDScript::handles_type(const String& p_type) const {
|
|||
|
||||
String ResourceFormatLoaderGDScript::get_resource_type(const String &p_path) const {
|
||||
|
||||
String el = p_path.extension().to_lower();
|
||||
String el = p_path.get_extension().to_lower();
|
||||
if (el=="gd" || el=="gdc" || el=="gde")
|
||||
return "GDScript";
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public:
|
|||
if (err==OK) {
|
||||
|
||||
fae->store_buffer(file.ptr(),file.size());
|
||||
p_path=p_path.basename()+".gde";
|
||||
p_path=p_path.get_basename()+".gde";
|
||||
}
|
||||
|
||||
memdelete(fae);
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
} else {
|
||||
|
||||
p_path=p_path.basename()+".gdc";
|
||||
p_path=p_path.get_basename()+".gdc";
|
||||
return file;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ void ResourceFormatLoaderAudioStreamOpus::get_recognized_extensions(List<String>
|
|||
}
|
||||
String ResourceFormatLoaderAudioStreamOpus::get_resource_type(const String &p_path) const {
|
||||
|
||||
if (p_path.extension().to_lower()=="opus")
|
||||
if (p_path.get_extension().to_lower()=="opus")
|
||||
return "AudioStreamOpus";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ bool ResourceFormatPBM::handles_type(const String& p_type) const {
|
|||
}
|
||||
String ResourceFormatPBM::get_resource_type(const String &p_path) const {
|
||||
|
||||
if (p_path.extension().to_lower()=="pbm")
|
||||
if (p_path.get_extension().to_lower()=="pbm")
|
||||
return "BitMap";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ bool ResourceFormatPVR::handles_type(const String& p_type) const {
|
|||
String ResourceFormatPVR::get_resource_type(const String &p_path) const {
|
||||
|
||||
|
||||
if (p_path.extension().to_lower()=="pvr")
|
||||
if (p_path.get_extension().to_lower()=="pvr")
|
||||
return "Texture";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -933,7 +933,7 @@ bool ResourceFormatLoaderVideoStreamTheora::handles_type(const String& p_type) c
|
|||
|
||||
String ResourceFormatLoaderVideoStreamTheora::get_resource_type(const String &p_path) const {
|
||||
|
||||
String exl=p_path.extension().to_lower();
|
||||
String exl=p_path.get_extension().to_lower();
|
||||
if (exl=="ogm" || exl=="ogv")
|
||||
return "VideoStreamTheora";
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ void ResourceFormatLoaderAudioStreamOGGVorbis::get_recognized_extensions(List<St
|
|||
}
|
||||
String ResourceFormatLoaderAudioStreamOGGVorbis::get_resource_type(const String &p_path) const {
|
||||
|
||||
if (p_path.extension().to_lower()=="ogg")
|
||||
if (p_path.get_extension().to_lower()=="ogg")
|
||||
return "AudioStreamOGGVorbis";
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ bool ResourceFormatLoaderVideoStreamWebm::handles_type(const String &p_type) con
|
|||
|
||||
String ResourceFormatLoaderVideoStreamWebm::get_resource_type(const String &p_path) const {
|
||||
|
||||
const String exl = p_path.extension().to_lower();
|
||||
const String exl = p_path.get_extension().to_lower();
|
||||
if (exl == "webm")
|
||||
return "VideoStreamWebm";
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue