Correct cleaning string and remove unused vars

This commit is contained in:
lainon committed 2022-09-30 12:26:30 +03:00
1 parent 89dab444c4
commit fec708489a
32 files changed
+38 -48

No files matched your search

+2 -2
View File
@@ -151,7 +151,7 @@ bool ManagedTexture::LoadFromFile(const std::string &filename, ImageFileType typ
size_t fileSize;
uint8_t *buffer = VFSReadFile(filename.c_str(), &fileSize);
if (!buffer) {
filename_ = "";
filename_.clear();
ERROR_LOG(IO, "Failed to read file '%s'", filename.c_str());
return false;
}
@@ -159,7 +159,7 @@ bool ManagedTexture::LoadFromFile(const std::string &filename, ImageFileType typ
if (retval) {
filename_ = filename;
} else {
filename_ = "";
filename_.clear();
ERROR_LOG(IO, "Failed to load texture '%s'", filename.c_str());
}
delete[] buffer;