diff --git a/code/AMFImporter_Postprocess.cpp b/code/AMFImporter_Postprocess.cpp index 8b4816efb..69aad1a66 100644 --- a/code/AMFImporter_Postprocess.cpp +++ b/code/AMFImporter_Postprocess.cpp @@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Header files, Assimp. #include "SceneCombiner.h" #include "StandardShapes.h" +#include "StringUtils.h" // Header files, stdlib. #include @@ -950,7 +951,7 @@ nl_clean_loop: pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials]; for(const SPP_Texture& tex_convd: mTexture_Converted) { - const aiString texture_id(AI_EMBEDDED_TEXNAME_PREFIX + std::to_string(idx)); + const aiString texture_id(AI_EMBEDDED_TEXNAME_PREFIX + to_string(idx)); const int mode = aiTextureOp_Multiply; const int repeat = tex_convd.Tiled ? 1 : 0; diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 48629ce05..a3bbc56ae 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "fast_atof.h" #include "SceneCombiner.h" #include "DefaultIOSystem.h" +#include "StringUtils.h" #include "XMLTools.h" #include #include @@ -637,7 +638,7 @@ void ColladaExporter::WriteMaterials() aiString name; if( mat->Get( AI_MATKEY_NAME, name) != aiReturn_SUCCESS ) name = "mat"; - materials[a].name = std::string( "m") + std::to_string(a) + name.C_Str(); + materials[a].name = std::string( "m") + to_string(a) + name.C_Str(); for( std::string::iterator it = materials[a].name.begin(); it != materials[a].name.end(); ++it ) { if( !isalnum_C( *it ) ) { *it = '_'; @@ -813,7 +814,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex) { if( mesh->HasTextureCoords( a) ) { - WriteFloatArray( idstr + "-tex" + std::to_string(a), mesh->mNumUVComponents[a] == 3 ? FloatType_TexCoord3 : FloatType_TexCoord2, + WriteFloatArray( idstr + "-tex" + to_string(a), mesh->mNumUVComponents[a] == 3 ? FloatType_TexCoord3 : FloatType_TexCoord2, (ai_real*) mesh->mTextureCoords[a], mesh->mNumVertices); } } @@ -822,7 +823,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex) for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { if( mesh->HasVertexColors( a) ) - WriteFloatArray( idstr + "-color" + std::to_string(a), FloatType_Color, (ai_real*) mesh->mColors[a], mesh->mNumVertices); + WriteFloatArray( idstr + "-color" + to_string(a), FloatType_Color, (ai_real*) mesh->mColors[a], mesh->mNumVertices); } // assemble vertex structure diff --git a/code/ColladaExporter.h b/code/ColladaExporter.h index ffb841b0e..e8bd9b71f 100644 --- a/code/ColladaExporter.h +++ b/code/ColladaExporter.h @@ -53,6 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include "StringUtils.h" + struct aiScene; struct aiNode; @@ -122,7 +124,9 @@ protected: void PopTag() { ai_assert( startstr.length() > 1); startstr.erase( startstr.length() - 2); } /// Creates a mesh ID for the given mesh - std::string GetMeshId( size_t pIndex) const { return std::string( "meshId" ) + std::to_string(pIndex); } + std::string GetMeshId( size_t pIndex) const { + return std::string( "meshId" ) + to_string(pIndex); + } public: /// Stringstream to write all output into diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 4fb30675f..aaccfad40 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -300,7 +300,7 @@ void ColladaParser::ReadAnimationClipLibrary() else if (indexID >= 0) animName = mReader->getAttributeValue(indexID); else - animName = std::string("animation_") + std::to_string(mAnimationClipLibrary.size()); + animName = std::string("animation_") + to_string(mAnimationClipLibrary.size()); std::pair > clip;