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

@@ -295,7 +295,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object> &objects) {
Surface &surf = obj.surfaces.back();
surf.flags = strtoul_cppstyle(buffer);
while (1) {
while (true) {
if (!GetNextLine()) {
throw DeadlyImportError("AC3D: Unexpected EOF: surface is incomplete");
}
@@ -750,7 +750,7 @@ void AC3DImporter::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() == nullptr) {
if (file == nullptr) {
throw DeadlyImportError("Failed to open AC3D file ", pFile, ".");
}