From: Kim Kulling Date: Sat, 15 Oct 2016 19:30:02 +0000 (+0200) Subject: C++11-Combat: last replacements of std::to_string. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7681089abc66712e844c01220918690d75c8941d;p=platform%2Fupstream%2Fassimp.git C++11-Combat: last replacements of std::to_string. --- diff --git a/code/StringUtils.h b/code/StringUtils.h index 99352eb..15f7db2 100644 --- a/code/StringUtils.h +++ b/code/StringUtils.h @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include @@ -103,7 +104,7 @@ float ai_strtof( const char *begin, const char *end ) { std::string token( begin, len ); val = static_cast< float >( ::atof( token.c_str() ) ); } - + return val; } diff --git a/code/X3DExporter.cpp b/code/X3DExporter.cpp index 0512888..cb6a674 100644 --- a/code/X3DExporter.cpp +++ b/code/X3DExporter.cpp @@ -10,6 +10,7 @@ // Header files, Assimp. #include "Exceptional.h" +#include "StringUtils.h" #include #include diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp index a552af1..878017d 100644 --- a/code/X3DImporter.cpp +++ b/code/X3DImporter.cpp @@ -795,7 +795,7 @@ void X3DImporter::GeometryHelper_Make_Arc2D(const float pStartAngle, const float { Throw_ArgOutOfRange( "GeometryHelper_Make_Arc2D.pStartAngle" ); } - if ( ( pEndAngle < -AI_MATH_TWO_PI_F ) || ( pEndAngle > AI_MATH_TWO_PI_F ) ) + if ( ( pEndAngle < -AI_MATH_TWO_PI_F ) || ( pEndAngle > AI_MATH_TWO_PI_F ) ) { Throw_ArgOutOfRange( "GeometryHelper_Make_Arc2D.pEndAngle" ); } @@ -1078,8 +1078,8 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list& // check indices array count. if(pColors.size() < pMesh.mNumVertices) { - throw DeadlyImportError("MeshGeometry_AddColor2. Colors count(" + std::to_string(pColors.size()) + ") can not be less than Vertices count(" + - std::to_string(pMesh.mNumVertices) + ")."); + throw DeadlyImportError("MeshGeometry_AddColor2. Colors count(" + to_string(pColors.size()) + ") can not be less than Vertices count(" + + to_string(pMesh.mNumVertices) + ")."); } // create list with colors for every vertex. col_tgt_arr.resize(pMesh.mNumVertices); @@ -1096,8 +1096,8 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list& // check indices array count. if(pColorIdx.size() < pMesh.mNumFaces) { - throw DeadlyImportError("MeshGeometry_AddColor2. Colors indices count(" + std::to_string(pColorIdx.size()) + - ") can not be less than Faces count(" + std::to_string(pMesh.mNumFaces) + ")."); + throw DeadlyImportError("MeshGeometry_AddColor2. Colors indices count(" + to_string(pColorIdx.size()) + + ") can not be less than Faces count(" + to_string(pMesh.mNumFaces) + ")."); } // create list with colors for every vertex using faces indices. col_tgt_arr.resize(pMesh.mNumFaces); @@ -1116,8 +1116,8 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list& // check indices array count. if(pColors.size() < pMesh.mNumFaces) { - throw DeadlyImportError("MeshGeometry_AddColor2. Colors count(" + std::to_string(pColors.size()) + ") can not be less than Faces count(" + - std::to_string(pMesh.mNumFaces) + ")."); + throw DeadlyImportError("MeshGeometry_AddColor2. Colors count(" + to_string(pColors.size()) + ") can not be less than Faces count(" + + to_string(pMesh.mNumFaces) + ")."); } // create list with colors for every vertex using faces indices. col_tgt_arr.resize(pMesh.mNumFaces); @@ -1273,7 +1273,7 @@ void X3DImporter::MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::list