Conform variable names to code standards

pull/3385/head
Joshua Hyatt 2020-08-29 23:58:31 -06:00
parent 953e976de6
commit dcf9a7b2d8
2 changed files with 11 additions and 11 deletions

View File

@ -141,8 +141,8 @@ void FBXImporter::SetupProperties(const Importer *pImp) {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure. // Imports the given file into the given scene structure.
void FBXImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) { void FBXImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
IOStream* stream = pIOHandler->Open(pFile, "rb"); IOStream* pStream = pIOHandler->Open(pFile, "rb");
if (!stream) { if (!pStream) {
ThrowException("Could not open file for reading"); ThrowException("Could not open file for reading");
} }
@ -154,12 +154,12 @@ void FBXImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// streaming for its output data structures so the net win with // streaming for its output data structures so the net win with
// streaming input data would be very low. // streaming input data would be very low.
std::vector<char> contents; std::vector<char> contents;
contents.resize(stream->FileSize() + 1); contents.resize(pStream->FileSize() + 1);
stream->Read(&*contents.begin(), 1, contents.size() - 1); pStream->Read(&*contents.begin(), 1, contents.size() - 1);
contents[contents.size() - 1] = 0; contents[contents.size() - 1] = 0;
const char *const begin = &*contents.begin(); const char *const begin = &*contents.begin();
pIOHandler->Close(stream); pIOHandler->Close(pStream);
// broadphase tokenizing pass in which we identify the core // broadphase tokenizing pass in which we identify the core
// syntax elements of FBX (brackets, commas, key:value mappings) // syntax elements of FBX (brackets, commas, key:value mappings)

View File

@ -107,22 +107,22 @@ const aiImporterDesc *ObjFileImporter::GetInfo() const {
void ObjFileImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSystem *pIOHandler) { void ObjFileImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSystem *pIOHandler) {
// Read file into memory // Read file into memory
static const std::string mode = "rb"; static const std::string mode = "rb";
IOStream *fileStream = pIOHandler->Open(file, mode); IOStream *pFileStream = pIOHandler->Open(file, mode);
if (!fileStream) { if (!pFileStream) {
throw DeadlyImportError("Failed to open file " + file + "."); throw DeadlyImportError("Failed to open file " + file + ".");
} }
// Get the file-size and validate it, throwing an exception when fails // Get the file-size and validate it, throwing an exception when fails
size_t fileSize = fileStream->FileSize(); size_t fileSize = pFileStream->FileSize();
if (fileSize < ObjMinSize) { if (fileSize < ObjMinSize) {
throw DeadlyImportError("OBJ-file is too small."); throw DeadlyImportError("OBJ-file is too small.");
} }
IOStreamBuffer<char> streamedBuffer; IOStreamBuffer<char> streamedBuffer;
streamedBuffer.open(fileStream); streamedBuffer.open(pFileStream);
// Allocate buffer and read file into it // Allocate buffer and read file into it
//TextFileToBuffer( fileStream,m_Buffer); //TextFileToBuffer( pFileStream,m_Buffer);
// Get the model name // Get the model name
std::string modelName, folderName; std::string modelName, folderName;
@ -145,7 +145,7 @@ void ObjFileImporter::InternReadFile(const std::string &file, aiScene *pScene, I
streamedBuffer.close(); streamedBuffer.close();
pIOHandler->Close(fileStream); pIOHandler->Close(pFileStream);
// Clean up allocated storage for the next import // Clean up allocated storage for the next import
m_Buffer.clear(); m_Buffer.clear();