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

View File

@@ -129,7 +129,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo> &output,
std::unique_ptr<IOStream> file(pIOHandler->Open(path, "rb"));
// Check whether we can read from the file
if (!file.get()) {
if (!file) {
ASSIMP_LOG_ERROR("NFF2: Unable to open material library ", path, ".");
return;
}
@@ -211,7 +211,7 @@ void NFFImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file
if (!file.get())
if (!file)
throw DeadlyImportError("Failed to open NFF file ", pFile, ".");
// allocate storage and copy the contents of the file to a memory buffer