rename String.extension() -> String.get_extension() / String.basename() -> String.get_basename()

This commit is contained in:
Juan Linietsky 2017-01-14 00:51:09 -03:00
parent f3b6177ece
commit d9d77291bc
51 changed files with 113 additions and 113 deletions

View file

@ -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 "";

View file

@ -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 "";
}

View file

@ -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 "";
}

View file

@ -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)) {

View file

@ -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 "";

View file

@ -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;
}
}

View 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 "";
}

View file

@ -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 "";
}

View file

@ -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 "";
}

View file

@ -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 "";

View file

@ -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 "";
}

View file

@ -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 "";