diff --git a/code/AssetLib/3DS/3DSExporter.cpp b/code/AssetLib/3DS/3DSExporter.cpp index 07e9ccfc7..92a6d5aa7 100644 --- a/code/AssetLib/3DS/3DSExporter.cpp +++ b/code/AssetLib/3DS/3DSExporter.cpp @@ -379,7 +379,7 @@ void Discreet3DSExporter::WriteTexture(const aiMaterial &mat, aiTextureType type // TODO: handle embedded textures properly if (path.data[0] == '*') { - ASSIMP_LOG_ERROR("Ignoring embedded texture for export: " + std::string(path.C_Str())); + ASSIMP_LOG_ERROR("Ignoring embedded texture for export: ", path.C_Str()); return; } diff --git a/code/AssetLib/ASE/ASEParser.cpp b/code/AssetLib/ASE/ASEParser.cpp index 4e4af8ed8..1f7018b11 100644 --- a/code/AssetLib/ASE/ASEParser.cpp +++ b/code/AssetLib/ASE/ASEParser.cpp @@ -1125,7 +1125,7 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode &mesh) { "this is no spot light or target camera"); } } else { - ASSIMP_LOG_ERROR("ASE: Unknown node transformation: " + temp); + ASSIMP_LOG_ERROR("ASE: Unknown node transformation: ", temp); // mode = 0 } continue; diff --git a/code/AssetLib/C4D/C4DImporter.cpp b/code/AssetLib/C4D/C4DImporter.cpp index 594bcfddd..434d1429e 100644 --- a/code/AssetLib/C4D/C4DImporter.cpp +++ b/code/AssetLib/C4D/C4DImporter.cpp @@ -238,7 +238,7 @@ bool C4DImporter::ReadShader(aiMaterial* out, BaseShader* shader) { out->AddProperty(&path, AI_MATKEY_TEXTURE_DIFFUSE(0)); return true; } else { - LogWarn("ignoring shader type: " + std::string(GetObjectTypeName(shader->GetType()))); + LogWarn("ignoring shader type: ", GetObjectTypeName(shader->GetType())); } shader = shader->GetNext(); } @@ -281,7 +281,7 @@ void C4DImporter::ReadMaterials(BaseMaterial* mat) { ReadShader(out, shader); } } else { - LogWarn("ignoring plugin material: " + std::string(GetObjectTypeName(mat->GetType()))); + LogWarn("ignoring plugin material: ", GetObjectTypeName(mat->GetType())); } mat = mat->GetNext(); } @@ -335,7 +335,7 @@ void C4DImporter::RecurseHierarchy(BaseObject* object, aiNode* parent) { meshes.push_back(mesh); } } else { - LogWarn("ignoring object: " + std::string(GetObjectTypeName(type))); + LogWarn("ignoring object: ", GetObjectTypeName(type)); } RecurseHierarchy(object->GetDown(), nd); diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 88d7ad626..8d37d3790 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -811,7 +811,7 @@ bool FBXConverter::GenerateTransformationNodeChain(const Model &model, const std // we need to generate a full node chain to accommodate for assimp's // lack to express pivots and offsets. if ((chainBits & chainMaskComplex) && doc.Settings().preservePivots) { - FBXImporter::LogInfo("generating full transformation chain for node: " + name); + FBXImporter::LogInfo("generating full transformation chain for node: ", name); // query the anim_chain_bits dictionary to find out which chain elements // have associated node animation channels. These can not be dropped @@ -918,7 +918,7 @@ void FBXConverter::ConvertModel(const Model &model, aiNode *parent, aiNode *root const std::vector &indices = ConvertLine(*line, root_node); std::copy(indices.begin(), indices.end(), std::back_inserter(meshes)); } else { - FBXImporter::LogWarn("ignoring unrecognized geometry: " + geo->Name()); + FBXImporter::LogWarn("ignoring unrecognized geometry: ", geo->Name()); } } @@ -944,7 +944,7 @@ FBXConverter::ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode * const std::vector &vertices = mesh.GetVertices(); const std::vector &faces = mesh.GetFaceIndexCounts(); if (vertices.empty() || faces.empty()) { - FBXImporter::LogWarn("ignoring empty geometry: " + mesh.Name()); + FBXImporter::LogWarn("ignoring empty geometry: ", mesh.Name()); return temp; } @@ -971,7 +971,7 @@ std::vector FBXConverter::ConvertLine(const LineGeometry &line, ai const std::vector &vertices = line.GetVertices(); const std::vector &indices = line.GetIndices(); if (vertices.empty() || indices.empty()) { - FBXImporter::LogWarn("ignoring empty line: " + line.Name()); + FBXImporter::LogWarn("ignoring empty line: ", line.Name()); return temp; } @@ -1815,14 +1815,14 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const TextureMap } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); continue; } if (uvIndex == -1) { uvIndex = index; } else { - FBXImporter::LogWarn("the UV channel named " + uvSet + + FBXImporter::LogWarn("the UV channel named ", uvSet, " appears at different positions in meshes, results will be wrong"); } } @@ -1839,7 +1839,7 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const TextureMap } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); } if (uvIndex == -1) { @@ -1848,7 +1848,7 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const TextureMap } if (uvIndex == -1) { - FBXImporter::LogWarn("failed to resolve UV channel " + uvSet + ", using first UV channel"); + FBXImporter::LogWarn("failed to resolve UV channel ", uvSet, ", using first UV channel"); uvIndex = 0; } } @@ -1934,14 +1934,14 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const LayeredTex } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); continue; } if (uvIndex == -1) { uvIndex = index; } else { - FBXImporter::LogWarn("the UV channel named " + uvSet + + FBXImporter::LogWarn("the UV channel named ", uvSet, " appears at different positions in meshes, results will be wrong"); } } @@ -1958,7 +1958,7 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const LayeredTex } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); } if (uvIndex == -1) { @@ -1967,7 +1967,7 @@ void FBXConverter::TrySetTextureProperties(aiMaterial *out_mat, const LayeredTex } if (uvIndex == -1) { - FBXImporter::LogWarn("failed to resolve UV channel " + uvSet + ", using first UV channel"); + FBXImporter::LogWarn("failed to resolve UV channel ", uvSet, ", using first UV channel"); uvIndex = 0; } } @@ -2319,14 +2319,14 @@ void FBXConverter::SetShadingPropertiesRaw(aiMaterial *out_mat, const PropertyTa } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); continue; } if (uvIndex == -1) { uvIndex = index; } else { - FBXImporter::LogWarn("the UV channel named " + uvSet + " appears at different positions in meshes, results will be wrong"); + FBXImporter::LogWarn("the UV channel named ", uvSet, " appears at different positions in meshes, results will be wrong"); } } } else { @@ -2342,7 +2342,7 @@ void FBXConverter::SetShadingPropertiesRaw(aiMaterial *out_mat, const PropertyTa } } if (index == -1) { - FBXImporter::LogWarn("did not find UV channel named " + uvSet + " in a mesh using this material"); + FBXImporter::LogWarn("did not find UV channel named ", uvSet, " in a mesh using this material"); } if (uvIndex == -1) { @@ -2351,7 +2351,7 @@ void FBXConverter::SetShadingPropertiesRaw(aiMaterial *out_mat, const PropertyTa } if (uvIndex == -1) { - FBXImporter::LogWarn("failed to resolve UV channel " + uvSet + ", using first UV channel"); + FBXImporter::LogWarn("failed to resolve UV channel ", uvSet, ", using first UV channel"); uvIndex = 0; } } @@ -2574,7 +2574,7 @@ void FBXConverter::ConvertAnimationStack(const AnimationStack &st) { // empty animations would fail validation, so drop them delete anim; animations.pop_back(); - FBXImporter::LogInfo("ignoring empty AnimationStack (using IK?): " + name); + FBXImporter::LogInfo("ignoring empty AnimationStack (using IK?): ", name); return; } @@ -2707,13 +2707,13 @@ void FBXConverter::GenerateNodeAnimations(std::vector &node_anims, ai_assert(node); if (node->TargetProperty().empty()) { - FBXImporter::LogWarn("target property for animation curve not set: " + node->Name()); + FBXImporter::LogWarn("target property for animation curve not set: ", node->Name()); continue; } curve_node = node; if (node->Curves().empty()) { - FBXImporter::LogWarn("no animation curves assigned to AnimationCurveNode: " + node->Name()); + FBXImporter::LogWarn("no animation curves assigned to AnimationCurveNode: ", node->Name()); continue; } @@ -2748,7 +2748,7 @@ void FBXConverter::GenerateNodeAnimations(std::vector &node_anims, if (doc.Settings().optimizeEmptyAnimationCurves && IsRedundantAnimationData(target, comp, (chain[i]->second))) { - FBXImporter::LogVerboseDebug("dropping redundant animation channel for node " + target.Name()); + FBXImporter::LogVerboseDebug("dropping redundant animation channel for node ", target.Name()); continue; } diff --git a/code/AssetLib/FBX/FBXDocumentUtil.cpp b/code/AssetLib/FBX/FBXDocumentUtil.cpp index 77455198f..ab15298a8 100644 --- a/code/AssetLib/FBX/FBXDocumentUtil.cpp +++ b/code/AssetLib/FBX/FBXDocumentUtil.cpp @@ -91,7 +91,7 @@ void DOMWarning(const std::string& message, const Element* element /*= nullptr*/ return; } if(DefaultLogger::get()) { - ASSIMP_LOG_WARN("FBX-DOM: " + message); + ASSIMP_LOG_WARN("FBX-DOM: ", message); } } diff --git a/code/AssetLib/IFC/IFCBoolean.cpp b/code/AssetLib/IFC/IFCBoolean.cpp index 6015920c1..86cac7f46 100644 --- a/code/AssetLib/IFC/IFCBoolean.cpp +++ b/code/AssetLib/IFC/IFCBoolean.cpp @@ -715,7 +715,7 @@ void ProcessBoolean(const Schema_2x3::IfcBooleanResult &boolean, TempMesh &resul // DIFFERENCE if (const Schema_2x3::IfcBooleanResult *const clip = boolean.ToPtr()) { if (clip->Operator != "DIFFERENCE") { - IFCImporter::LogWarn("encountered unsupported boolean operator: " + (std::string)clip->Operator); + IFCImporter::LogWarn("encountered unsupported boolean operator: ", (std::string)clip->Operator); return; } @@ -756,7 +756,7 @@ void ProcessBoolean(const Schema_2x3::IfcBooleanResult &boolean, TempMesh &resul ProcessBooleanExtrudedAreaSolidDifference(as, result, first_operand, conv); } } else { - IFCImporter::LogWarn("skipping unknown IfcBooleanResult entity, type is " + boolean.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcBooleanResult entity, type is ", boolean.GetClassName()); } } diff --git a/code/AssetLib/IFC/IFCGeometry.cpp b/code/AssetLib/IFC/IFCGeometry.cpp index 664444443..6e645f1ae 100644 --- a/code/AssetLib/IFC/IFCGeometry.cpp +++ b/code/AssetLib/IFC/IFCGeometry.cpp @@ -216,7 +216,7 @@ void ProcessConnectedFaceSet(const Schema_2x3::IfcConnectedFaceSet& fset, TempMe } } else { - IFCImporter::LogWarn("skipping unknown IfcFaceBound entity, type is " + bound.Bound->GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcFaceBound entity, type is ", bound.Bound->GetClassName()); continue; } @@ -729,7 +729,7 @@ void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept, TempMesh& ProcessRevolvedAreaSolid(*rev,meshout,conv); } else { - IFCImporter::LogWarn("skipping unknown IfcSweptAreaSolid entity, type is " + swept.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcSweptAreaSolid entity, type is ", swept.GetClassName()); } } @@ -781,7 +781,7 @@ bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo, unsigned return false; } else { - IFCImporter::LogWarn("skipping unknown IfcGeometricRepresentationItem entity, type is " + geo.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcGeometricRepresentationItem entity, type is ", geo.GetClassName()); return false; } diff --git a/code/AssetLib/IFC/IFCLoader.cpp b/code/AssetLib/IFC/IFCLoader.cpp index 46b36bd51..daf2cc946 100644 --- a/code/AssetLib/IFC/IFCLoader.cpp +++ b/code/AssetLib/IFC/IFCLoader.cpp @@ -243,12 +243,12 @@ void IFCImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy } if (!DefaultLogger::isNullLogger()) { - LogDebug("File schema is \'" + head.fileSchema + '\''); + LogDebug("File schema is \'", head.fileSchema, '\''); if (head.timestamp.length()) { - LogDebug("Timestamp \'" + head.timestamp + '\''); + LogDebug("Timestamp \'", head.timestamp, '\''); } if (head.app.length()) { - LogDebug("Application/Exporter identline is \'" + head.app + '\''); + LogDebug("Application/Exporter identline is \'", head.app, '\''); } } @@ -403,7 +403,7 @@ void ResolveObjectPlacement(aiMatrix4x4 &m, const Schema_2x3::IfcObjectPlacement m = tmpM * m; } } else { - IFCImporter::LogWarn("skipping unknown IfcObjectPlacement entity, type is " + place.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcObjectPlacement entity, type is ", place.GetClassName()); } } diff --git a/code/AssetLib/IFC/IFCMaterial.cpp b/code/AssetLib/IFC/IFCMaterial.cpp index e0146b887..2a79f0754 100644 --- a/code/AssetLib/IFC/IFCMaterial.cpp +++ b/code/AssetLib/IFC/IFCMaterial.cpp @@ -64,7 +64,7 @@ static int ConvertShadingMode(const std::string& name) { else if (name == "PHONG") { return aiShadingMode_Phong; } - IFCImporter::LogWarn("shading mode "+name+" not recognized by Assimp, using Phong instead"); + IFCImporter::LogWarn("shading mode ", name, " not recognized by Assimp, using Phong instead"); return aiShadingMode_Phong; } @@ -145,7 +145,7 @@ unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionDat // not found, create new material const std::string side = static_cast(surf->Side); if( side != "BOTH" ) { - IFCImporter::LogWarn("ignoring surface side marker on IFC::IfcSurfaceStyle: " + side); + IFCImporter::LogWarn("ignoring surface side marker on IFC::IfcSurfaceStyle: ", side); } std::unique_ptr mat(new aiMaterial()); diff --git a/code/AssetLib/IFC/IFCProfile.cpp b/code/AssetLib/IFC/IFCProfile.cpp index f33f8cdbe..4235be181 100644 --- a/code/AssetLib/IFC/IFCProfile.cpp +++ b/code/AssetLib/IFC/IFCProfile.cpp @@ -68,7 +68,7 @@ bool ProcessCurve(const Schema_2x3::IfcCurve& curve, TempMesh& meshout, Convers { std::unique_ptr cv(Curve::Convert(curve,conv)); if (!cv) { - IFCImporter::LogWarn("skipping unknown IfcCurve entity, type is " + curve.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcCurve entity, type is ", curve.GetClassName()); return false; } @@ -78,7 +78,7 @@ bool ProcessCurve(const Schema_2x3::IfcCurve& curve, TempMesh& meshout, Convers bc->SampleDiscrete(meshout); } catch(const CurveError& cv) { - IFCImporter::LogError(cv.mStr + " (error occurred while processing curve)"); + IFCImporter::LogError(cv.mStr, " (error occurred while processing curve)"); return false; } meshout.mVertcnt.push_back(static_cast(meshout.mVerts.size())); @@ -152,7 +152,7 @@ void ProcessParametrizedProfile(const Schema_2x3::IfcParameterizedProfileDef& de meshout.mVertcnt.push_back(12); } else { - IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is ", def.GetClassName()); return; } @@ -174,7 +174,7 @@ bool ProcessProfile(const Schema_2x3::IfcProfileDef& prof, TempMesh& meshout, Co ProcessParametrizedProfile(*cparam,meshout,conv); } else { - IFCImporter::LogWarn("skipping unknown IfcProfileDef entity, type is " + prof.GetClassName()); + IFCImporter::LogWarn("skipping unknown IfcProfileDef entity, type is ", prof.GetClassName()); return false; } meshout.RemoveAdjacentDuplicates(); diff --git a/code/AssetLib/IFC/IFCUtil.cpp b/code/AssetLib/IFC/IFCUtil.cpp index b451262e9..8c37cebed 100644 --- a/code/AssetLib/IFC/IFCUtil.cpp +++ b/code/AssetLib/IFC/IFCUtil.cpp @@ -506,7 +506,7 @@ IfcFloat ConvertSIPrefix(const std::string& prefix) return 1e-18f; } else { - IFCImporter::LogError("Unrecognized SI prefix: " + prefix); + IFCImporter::LogError("Unrecognized SI prefix: ", prefix); return 1; } } diff --git a/code/AssetLib/Irr/IRRLoader.cpp b/code/AssetLib/Irr/IRRLoader.cpp index 9ec0a9244..cb383e936 100644 --- a/code/AssetLib/Irr/IRRLoader.cpp +++ b/code/AssetLib/Irr/IRRLoader.cpp @@ -639,7 +639,7 @@ void IRRImporter::GenerateGraph(Node *root, aiNode *rootOut, aiScene *scene, // graph we're currently building aiScene *localScene = batch.GetImport(root->id); if (!localScene) { - ASSIMP_LOG_ERROR("IRR: Unable to load external file: " + root->meshPath); + ASSIMP_LOG_ERROR("IRR: Unable to load external file: ", root->meshPath); break; } attach.push_back(AttachmentInfo(localScene, rootOut)); @@ -963,7 +963,7 @@ void IRRImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy ASSIMP_LOG_ERROR("IRR: Billboards are not supported by Assimp"); nd = new Node(Node::DUMMY); } else { - ASSIMP_LOG_WARN("IRR: Found unknown node: " + std::string(attrib.name())); + ASSIMP_LOG_WARN("IRR: Found unknown node: ", attrib.name()); /* We skip the contents of nodes we don't know. * We parse the transformation and all animators @@ -1181,7 +1181,7 @@ void IRRImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy lights.pop_back(); curNode->type = Node::DUMMY; - ASSIMP_LOG_ERROR("Ignoring light of unknown type: " + prop.value); + ASSIMP_LOG_ERROR("Ignoring light of unknown type: ", prop.value); } } else if ((prop.name == "Mesh" && Node::MESH == curNode->type) || Node::ANIMMESH == curNode->type) { @@ -1225,7 +1225,7 @@ void IRRImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy } else if (prop.value == "followSpline") { curAnim->type = Animator::FOLLOW_SPLINE; } else { - ASSIMP_LOG_WARN("IRR: Ignoring unknown animator: " + prop.value); + ASSIMP_LOG_WARN("IRR: Ignoring unknown animator: ", prop.value); curAnim->type = Animator::UNKNOWN; } diff --git a/code/AssetLib/Irr/IRRShared.cpp b/code/AssetLib/Irr/IRRShared.cpp index b119b063a..b42f34b65 100644 --- a/code/AssetLib/Irr/IRRShared.cpp +++ b/code/AssetLib/Irr/IRRShared.cpp @@ -260,7 +260,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags) { prop.value == "parallaxmap_trans_add") { matFlags = AI_IRRMESH_MAT_normalmap_ta; } else { - ASSIMP_LOG_WARN("IRRMat: Unrecognized material type: " + prop.value); + ASSIMP_LOG_WARN("IRRMat: Unrecognized material type: ", prop.value); } } diff --git a/code/AssetLib/LWO/LWOLoader.cpp b/code/AssetLib/LWO/LWOLoader.cpp index 7a2916424..bc62152c5 100644 --- a/code/AssetLib/LWO/LWOLoader.cpp +++ b/code/AssetLib/LWO/LWOLoader.cpp @@ -961,7 +961,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) { switch (type) { case AI_LWO_TXUV: if (dims != 2) { - ASSIMP_LOG_WARN("LWO2: Skipping UV channel \'" + name + "\' with !2 components"); + ASSIMP_LOG_WARN("LWO2: Skipping UV channel \'", name, "\' with !2 components"); return; } base = FindEntry(mCurLayer->mUVChannels, name, perPoly); @@ -969,7 +969,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) { case AI_LWO_WGHT: case AI_LWO_MNVW: if (dims != 1) { - ASSIMP_LOG_WARN("LWO2: Skipping Weight Channel \'" + name + "\' with !1 components"); + ASSIMP_LOG_WARN("LWO2: Skipping Weight Channel \'", name, "\' with !1 components"); return; } base = FindEntry((type == AI_LWO_WGHT ? mCurLayer->mWeightChannels : mCurLayer->mSWeightChannels), name, perPoly); @@ -977,7 +977,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) { case AI_LWO_RGB: case AI_LWO_RGBA: if (dims != 3 && dims != 4) { - ASSIMP_LOG_WARN("LWO2: Skipping Color Map \'" + name + "\' with a dimension > 4 or < 3"); + ASSIMP_LOG_WARN("LWO2: Skipping Color Map \'", name, "\' with a dimension > 4 or < 3"); return; } base = FindEntry(mCurLayer->mVColorChannels, name, perPoly); diff --git a/code/AssetLib/LWO/LWOMaterial.cpp b/code/AssetLib/LWO/LWOMaterial.cpp index 186aa8a42..178f24265 100644 --- a/code/AssetLib/LWO/LWOMaterial.cpp +++ b/code/AssetLib/LWO/LWOMaterial.cpp @@ -711,7 +711,7 @@ void LWOImporter::LoadLWO2Surface(unsigned int size) { } } if (derived.size()) { - ASSIMP_LOG_WARN("LWO2: Unable to find source surface: " + derived); + ASSIMP_LOG_WARN("LWO2: Unable to find source surface: ", derived); } } diff --git a/code/AssetLib/LWS/LWSLoader.cpp b/code/AssetLib/LWS/LWSLoader.cpp index a75b90ef9..d469a1064 100644 --- a/code/AssetLib/LWS/LWSLoader.cpp +++ b/code/AssetLib/LWS/LWSLoader.cpp @@ -346,7 +346,7 @@ void LWSImporter::BuildGraph(aiNode *nd, LWS::NodeDesc &src, std::vectormRootNode->mNumChildren == 1) { @@ -538,7 +538,7 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy // get file format version and print to log ++it; unsigned int version = strtoul10((*it).tokens[0].c_str()); - ASSIMP_LOG_INFO("LWS file format version is " + (*it).tokens[0]); + ASSIMP_LOG_INFO("LWS file format version is ", (*it).tokens[0]); first = 0.; last = 60.; fps = 25.; // seems to be a good default frame rate diff --git a/code/AssetLib/M3D/M3DImporter.cpp b/code/AssetLib/M3D/M3DImporter.cpp index 5485b1bff..380e92c4f 100644 --- a/code/AssetLib/M3D/M3DImporter.cpp +++ b/code/AssetLib/M3D/M3DImporter.cpp @@ -209,7 +209,7 @@ void M3DImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSys pScene->mRootNode->mNumChildren = 0; mScene = pScene; - ASSIMP_LOG_DEBUG("M3D: root node " + m3d.Name()); + ASSIMP_LOG_DEBUG("M3D: root node ", m3d.Name()); // now we just have to fill up the Assimp structures in pScene importMaterials(m3d); diff --git a/code/AssetLib/MD3/MD3Loader.cpp b/code/AssetLib/MD3/MD3Loader.cpp index 18c3d4228..a3d36f00d 100644 --- a/code/AssetLib/MD3/MD3Loader.cpp +++ b/code/AssetLib/MD3/MD3Loader.cpp @@ -101,7 +101,7 @@ Q3Shader::BlendFunc StringToBlendFunc(const std::string &m) { if (m == "GL_ONE_MINUS_DST_COLOR") { return Q3Shader::BLEND_GL_ONE_MINUS_DST_COLOR; } - ASSIMP_LOG_ERROR("Q3Shader: Unknown blend function: " + m); + ASSIMP_LOG_ERROR("Q3Shader: Unknown blend function: ", m); return Q3Shader::BLEND_NONE; } @@ -226,7 +226,7 @@ bool Q3Shader::LoadSkin(SkinData &fill, const std::string &pFile, IOSystem *io) if (!file.get()) return false; // if we can't access the file, don't worry and return - ASSIMP_LOG_INFO("Loading Quake3 skin file " + pFile); + ASSIMP_LOG_INFO("Loading Quake3 skin file ", pFile); // read file in memory const size_t s = file->FileSize(); @@ -880,9 +880,9 @@ void MD3Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy if (dit != shaders.blocks.end()) { // We made it! shader = &*dit; - ASSIMP_LOG_INFO("Found shader record for " + without_ext); + ASSIMP_LOG_INFO("Found shader record for ", without_ext); } else { - ASSIMP_LOG_WARN("Unable to find shader record for " + without_ext); + ASSIMP_LOG_WARN("Unable to find shader record for ", without_ext); } } diff --git a/code/AssetLib/MD5/MD5Loader.cpp b/code/AssetLib/MD5/MD5Loader.cpp index b99638cd2..0d9c77b71 100644 --- a/code/AssetLib/MD5/MD5Loader.cpp +++ b/code/AssetLib/MD5/MD5Loader.cpp @@ -345,7 +345,7 @@ void MD5Importer::LoadMD5MeshFile() { // Check whether we can read from the file if (file.get() == nullptr || !file->FileSize()) { - ASSIMP_LOG_WARN("Failed to access MD5MESH file: " + filename); + ASSIMP_LOG_WARN("Failed to access MD5MESH file: ", filename); return; } mHadMD5Mesh = true; @@ -567,7 +567,7 @@ void MD5Importer::LoadMD5AnimFile() { // Check whether we can read from the file if (!file.get() || !file->FileSize()) { - ASSIMP_LOG_WARN("Failed to read MD5ANIM file: " + pFile); + ASSIMP_LOG_WARN("Failed to read MD5ANIM file: ", pFile); return; } diff --git a/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp b/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp index 2d2fd7427..e6576b344 100644 --- a/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp +++ b/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp @@ -1343,7 +1343,7 @@ bool HL1MDLLoader::get_num_blend_controllers(const int num_blend_animations, int return true; default: num_blend_controllers = 0; - ASSIMP_LOG_WARN(MDL_HALFLIFE_LOG_HEADER "Unsupported number of blend animations (" + std::to_string(num_blend_animations) + ")"); + ASSIMP_LOG_WARN(MDL_HALFLIFE_LOG_HEADER "Unsupported number of blend animations (", num_blend_animations, ")"); return false; } } diff --git a/code/AssetLib/NFF/NFFLoader.cpp b/code/AssetLib/NFF/NFFLoader.cpp index 65f2dc069..15f46b5e6 100644 --- a/code/AssetLib/NFF/NFFLoader.cpp +++ b/code/AssetLib/NFF/NFFLoader.cpp @@ -132,7 +132,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector &output, // Check whether we can read from the file if (!file.get()) { - ASSIMP_LOG_ERROR("NFF2: Unable to open material library " + path + "."); + ASSIMP_LOG_ERROR("NFF2: Unable to open material library ", path, "."); return; } diff --git a/code/AssetLib/Obj/ObjFileParser.cpp b/code/AssetLib/Obj/ObjFileParser.cpp index a8039ae23..767805c10 100644 --- a/code/AssetLib/Obj/ObjFileParser.cpp +++ b/code/AssetLib/Obj/ObjFileParser.cpp @@ -556,7 +556,7 @@ void ObjFileParser::getMaterialDesc() { // This may be the case if the material library is missing. We don't want to lose all // materials if that happens, so create a new named material instead of discarding it // completely. - ASSIMP_LOG_ERROR("OBJ: failed to locate material " + strName + ", creating new material"); + ASSIMP_LOG_ERROR("OBJ: failed to locate material ", strName, ", creating new material"); m_pModel->m_pCurrentMaterial = new ObjFile::Material(); m_pModel->m_pCurrentMaterial->MaterialName.Set(strName); m_pModel->m_MaterialLib.push_back(strName); @@ -620,12 +620,12 @@ void ObjFileParser::getMaterialLib() { IOStream *pFile = m_pIO->Open(absName); if (nullptr == pFile) { - ASSIMP_LOG_ERROR("OBJ: Unable to locate material file " + strMatName); + ASSIMP_LOG_ERROR("OBJ: Unable to locate material file ", strMatName); std::string strMatFallbackName = m_originalObjFileName.substr(0, m_originalObjFileName.length() - 3) + "mtl"; - ASSIMP_LOG_INFO("OBJ: Opening fallback material file " + strMatFallbackName); + ASSIMP_LOG_INFO("OBJ: Opening fallback material file ", strMatFallbackName); pFile = m_pIO->Open(strMatFallbackName); if (!pFile) { - ASSIMP_LOG_ERROR("OBJ: Unable to locate fallback material file " + strMatFallbackName); + ASSIMP_LOG_ERROR("OBJ: Unable to locate fallback material file ", strMatFallbackName); m_DataIt = skipLine(m_DataIt, m_DataItEnd, m_uiLine); return; } @@ -660,7 +660,7 @@ void ObjFileParser::getNewMaterial() { std::map::iterator it = m_pModel->m_MaterialMap.find(strMat); if (it == m_pModel->m_MaterialMap.end()) { // Show a warning, if material was not found - ASSIMP_LOG_WARN("OBJ: Unsupported material requested: " + strMat); + ASSIMP_LOG_WARN("OBJ: Unsupported material requested: ", strMat); m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial; } else { // Set new material diff --git a/code/AssetLib/Ogre/OgreBinarySerializer.cpp b/code/AssetLib/Ogre/OgreBinarySerializer.cpp index b54316514..1d20799a1 100644 --- a/code/AssetLib/Ogre/OgreBinarySerializer.cpp +++ b/code/AssetLib/Ogre/OgreBinarySerializer.cpp @@ -155,7 +155,7 @@ uint16_t OgreBinarySerializer::ReadHeader(bool readLen) { #if (OGRE_BINARY_SERIALIZER_DEBUG == 1) if (id != HEADER_CHUNK_ID) { - ASSIMP_LOG_DEBUG(Formatter::format() << (assetMode == AM_Mesh ? MeshHeaderToString(static_cast(id)) : SkeletonHeaderToString(static_cast(id)))); + ASSIMP_LOG_DEBUG((assetMode == AM_Mesh ? MeshHeaderToString(static_cast(id)) : SkeletonHeaderToString(static_cast(id)))); } #endif diff --git a/code/AssetLib/Ogre/OgreMaterial.cpp b/code/AssetLib/Ogre/OgreMaterial.cpp index cafdda795..295dedde6 100644 --- a/code/AssetLib/Ogre/OgreMaterial.cpp +++ b/code/AssetLib/Ogre/OgreMaterial.cpp @@ -477,7 +477,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr return false; } if (textureType == aiTextureType_NONE) { - ASSIMP_LOG_WARN("Failed to detect texture type for '" + textureRef + "', ignoring texture_unit."); + ASSIMP_LOG_WARN("Failed to detect texture type for '", textureRef, "', ignoring texture_unit."); return false; } diff --git a/code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp b/code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp index 7d9e1f6eb..becfa41fc 100644 --- a/code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp +++ b/code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp @@ -446,7 +446,7 @@ void Q3BSPFileImporter::createMaterials(const Q3BSP::Q3BSPModel *pModel, aiScene normalizePathName(tmp, texName); if (!importTextureFromArchive(pModel, pArchive, pScene, pMatHelper, textureId)) { - ASSIMP_LOG_ERROR("Cannot import texture from archive " + texName); + ASSIMP_LOG_ERROR("Cannot import texture from archive ", texName); } } } diff --git a/code/AssetLib/glTF2/glTF2Importer.cpp b/code/AssetLib/glTF2/glTF2Importer.cpp index 1edfc602b..dbc8267d3 100644 --- a/code/AssetLib/glTF2/glTF2Importer.cpp +++ b/code/AssetLib/glTF2/glTF2Importer.cpp @@ -455,14 +455,14 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) { if (attr.normal.size() > 0 && attr.normal[0]) { if (attr.normal[0]->count != aim->mNumVertices) { - DefaultLogger::get()->warn("Normal count in mesh \"" + mesh.name + "\" does not match the vertex count, normals ignored."); + DefaultLogger::get()->warn("Normal count in mesh \"", mesh.name, "\" does not match the vertex count, normals ignored."); } else { attr.normal[0]->ExtractData(aim->mNormals); // only extract tangents if normals are present if (attr.tangent.size() > 0 && attr.tangent[0]) { if (attr.tangent[0]->count != aim->mNumVertices) { - DefaultLogger::get()->warn("Tangent count in mesh \"" + mesh.name + "\" does not match the vertex count, tangents ignored."); + DefaultLogger::get()->warn("Tangent count in mesh \"", mesh.name, "\" does not match the vertex count, tangents ignored."); } else { // generate bitangents from normals and tangents according to spec Tangent *tangents = nullptr; @@ -485,7 +485,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) { for (size_t c = 0; c < attr.color.size() && c < AI_MAX_NUMBER_OF_COLOR_SETS; ++c) { if (attr.color[c]->count != aim->mNumVertices) { - DefaultLogger::get()->warn("Color stream size in mesh \"" + mesh.name + + DefaultLogger::get()->warn("Color stream size in mesh \"", mesh.name, "\" does not match the vertex count"); continue; } @@ -508,7 +508,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) { } if (attr.texcoord[tc]->count != aim->mNumVertices) { - DefaultLogger::get()->warn("Texcoord stream size in mesh \"" + mesh.name + + DefaultLogger::get()->warn("Texcoord stream size in mesh \"", mesh.name, "\" does not match the vertex count"); continue; } diff --git a/code/Common/FileSystemFilter.h b/code/Common/FileSystemFilter.h index 92f199870..6585f9df6 100644 --- a/code/Common/FileSystemFilter.h +++ b/code/Common/FileSystemFilter.h @@ -89,7 +89,7 @@ public: mBase += getOsSeparator(); } - DefaultLogger::get()->info("Import root directory is \'" + mBase + "\'"); + DefaultLogger::get()->info("Import root directory is \'", mBase, "\'"); } /** Destructor. */ diff --git a/code/Common/Importer.cpp b/code/Common/Importer.cpp index 61e5938f6..a2ad041fb 100644 --- a/code/Common/Importer.cpp +++ b/code/Common/Importer.cpp @@ -665,7 +665,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags) { if ( nullptr != desc ) { ext = desc->mName; } - ASSIMP_LOG_INFO("Found a matching importer for this file format: " + ext + "." ); + ASSIMP_LOG_INFO("Found a matching importer for this file format: ", ext, "." ); pimpl->mProgressHandler->UpdateFileRead( 0, fileSize ); if (profiler) { diff --git a/code/Material/MaterialSystem.cpp b/code/Material/MaterialSystem.cpp index 310dea29d..c35a1aa93 100644 --- a/code/Material/MaterialSystem.cpp +++ b/code/Material/MaterialSystem.cpp @@ -160,7 +160,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial *pMat, break; } if (!IsSpace(*cur)) { - ASSIMP_LOG_ERROR("Material property" + std::string(pKey) + + ASSIMP_LOG_ERROR("Material property", pKey, " is a string; failed to parse a float array out of it."); return AI_FAILURE; } @@ -238,7 +238,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial *pMat, break; } if (!IsSpace(*cur)) { - ASSIMP_LOG_ERROR("Material property" + std::string(pKey) + + ASSIMP_LOG_ERROR("Material property", pKey, " is a string; failed to parse an integer array out of it."); return AI_FAILURE; } @@ -306,8 +306,7 @@ aiReturn aiGetMaterialString(const aiMaterial *pMat, memcpy(pOut->data, prop->mData + 4, pOut->length + 1); } else { // TODO - implement lexical cast as well - ASSIMP_LOG_ERROR("Material property" + std::string(pKey) + - " was found, but is no string"); + ASSIMP_LOG_ERROR("Material property", pKey, " was found, but is no string"); return AI_FAILURE; } return AI_SUCCESS; diff --git a/code/PostProcessing/ValidateDataStructure.cpp b/code/PostProcessing/ValidateDataStructure.cpp index 3058ca6ce..6a872ef11 100644 --- a/code/PostProcessing/ValidateDataStructure.cpp +++ b/code/PostProcessing/ValidateDataStructure.cpp @@ -99,7 +99,7 @@ void ValidateDSProcess::ReportWarning(const char *msg, ...) { ai_assert(iLen > 0); va_end(args); - ASSIMP_LOG_WARN("Validation warning: " + std::string(szBuffer, iLen)); + ASSIMP_LOG_WARN("Validation warning: ", std::string(szBuffer, iLen)); } // ------------------------------------------------------------------------------------------------