Add has_extension() method to String
This commit is contained in:
@ -100,7 +100,7 @@ AudioServer::SpeakerMode MovieWriterOGV::get_audio_speaker_mode() const {
|
||||
}
|
||||
|
||||
bool MovieWriterOGV::handles_file(const String &p_path) const {
|
||||
return p_path.get_extension().to_lower() == "ogv";
|
||||
return p_path.has_extension("ogv");
|
||||
}
|
||||
|
||||
void MovieWriterOGV::get_supported_extensions(List<String> *r_extensions) const {
|
||||
|
||||
@ -819,8 +819,7 @@ bool ResourceFormatLoaderTheora::handles_type(const String &p_type) const {
|
||||
}
|
||||
|
||||
String ResourceFormatLoaderTheora::get_resource_type(const String &p_path) const {
|
||||
String el = p_path.get_extension().to_lower();
|
||||
if (el == "ogv") {
|
||||
if (p_path.has_extension("ogv")) {
|
||||
return "VideoStreamTheora";
|
||||
}
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user