Merge branch 'master' into new-file-detection
This commit is contained in:
@@ -113,7 +113,7 @@ static void extractIds(const std::string &key, int &id1, int &id2) {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Local helper function to normalize filenames.
|
||||
static void normalizePathName(const std::string &rPath, std::string &normalizedPath) {
|
||||
normalizedPath = "";
|
||||
normalizedPath = std::string();
|
||||
if (rPath.empty()) {
|
||||
return;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene *scene,
|
||||
throw DeadlyImportError("Failed to open file ", rFile, ".");
|
||||
}
|
||||
|
||||
std::string archiveName(""), mapName("");
|
||||
std::string archiveName, mapName;
|
||||
separateMapName(rFile, archiveName, mapName);
|
||||
|
||||
if (mapName.empty()) {
|
||||
@@ -198,8 +198,8 @@ void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene *scene,
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Separates the map name from the import name.
|
||||
void Q3BSPFileImporter::separateMapName(const std::string &importName, std::string &archiveName, std::string &mapName) {
|
||||
archiveName = "";
|
||||
mapName = "";
|
||||
archiveName = std::string();
|
||||
mapName = std::string();
|
||||
if (importName.empty()) {
|
||||
return;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void Q3BSPFileImporter::separateMapName(const std::string &importName, std::stri
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns the first map in the map archive.
|
||||
bool Q3BSPFileImporter::findFirstMapInArchive(ZipArchiveIOSystem &bspArchive, std::string &mapName) {
|
||||
mapName = "";
|
||||
mapName = std::string();
|
||||
std::vector<std::string> fileList;
|
||||
bspArchive.getFileListExtension(fileList, "bsp");
|
||||
if (fileList.empty()) {
|
||||
@@ -436,7 +436,7 @@ void Q3BSPFileImporter::createMaterials(const Q3BSP::Q3BSPModel *pModel, aiScene
|
||||
if (-1 != textureId) {
|
||||
sQ3BSPTexture *pTexture = pModel->m_Textures[textureId];
|
||||
if (nullptr != pTexture) {
|
||||
std::string tmp("*"), texName("");
|
||||
std::string tmp("*"), texName;
|
||||
tmp += pTexture->strName;
|
||||
tmp += ".jpg";
|
||||
normalizePathName(tmp, texName);
|
||||
@@ -508,7 +508,7 @@ size_t Q3BSPFileImporter::countTriangles(const std::vector<Q3BSP::sQ3BSPFace *>
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Creates the faces-to-material map.
|
||||
void Q3BSPFileImporter::createMaterialMap(const Q3BSP::Q3BSPModel *pModel) {
|
||||
std::string key("");
|
||||
std::string key;
|
||||
std::vector<sQ3BSPFace *> *pCurFaceArray = nullptr;
|
||||
for (size_t idx = 0; idx < pModel->m_Faces.size(); idx++) {
|
||||
Q3BSP::sQ3BSPFace *pQ3BSPFace = pModel->m_Faces[idx];
|
||||
@@ -656,7 +656,7 @@ bool Q3BSPFileImporter::expandFile(ZipArchiveIOSystem *pArchive, const std::stri
|
||||
|
||||
if (rExtList.empty()) {
|
||||
rFile = rFilename;
|
||||
rExt = "";
|
||||
rExt = std::string();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user