Apply various clang-tidy checks for smartprs and modern C++ types

This commit is contained in:
Aaron Gokaslan
2022-11-08 11:03:55 -05:00
parent cfed74516b
commit ccfb175460
92 changed files with 542 additions and 541 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ Q3Shader::BlendFunc StringToBlendFunc(const std::string &m) {
// Load a Quake 3 shader
bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *io) {
std::unique_ptr<IOStream> file(io->Open(pFile, "rt"));
if (!file.get())
if (!file)
return false; // if we can't access the file, don't worry and return
ASSIMP_LOG_INFO("Loading Quake3 shader file ", pFile);
@@ -223,7 +223,7 @@ bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *
// Load a Quake 3 skin
bool Q3Shader::LoadSkin(SkinData &fill, const std::string &pFile, IOSystem *io) {
std::unique_ptr<IOStream> file(io->Open(pFile, "rt"));
if (!file.get())
if (!file)
return false; // if we can't access the file, don't worry and return
ASSIMP_LOG_INFO("Loading Quake3 skin file ", pFile);
@@ -709,7 +709,7 @@ void MD3Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file
if (file.get() == nullptr) {
if (file == nullptr) {
throw DeadlyImportError("Failed to open MD3 file ", pFile, ".");
}