mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 11:56:03 +00:00
Remove deprecated code and minor cleanup.
This commit is contained in:
parent
28694c5814
commit
b7a5056a4a
@ -288,20 +288,12 @@ static bool image_exists(const std::string& name)
|
||||
{
|
||||
bool precached = name.find("..") == std::string::npos;
|
||||
|
||||
if(precached) {
|
||||
if(image::precached_file_exists(name))
|
||||
if(precached && image::precached_file_exists(name)) {
|
||||
return true;
|
||||
} else if (image::exists(name)){
|
||||
} else if(image::exists(name)) {
|
||||
return true;
|
||||
}
|
||||
// This warning can be removed after 1.9.2
|
||||
///@deprecated 1.9.2 warning for missing .png in terrain images
|
||||
if(name.find(".png") == std::string::npos) {
|
||||
const std::string name_png = name + ".png";
|
||||
if(image::exists(name_png) || (precached && image::precached_file_exists(name_png))) {
|
||||
lg::wml_error << "Terrain image '" << name << "' misses the '.png' extension\n";
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user