C++11-combat: hopefully the last std::to_string to replace.
parent
46d78f57d5
commit
5cb4df80ad
|
@ -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 <algorithm>
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 <assimp/IOSystem.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
|
@ -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
|
||||
|
|
|
@ -53,6 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#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
|
||||
|
|
|
@ -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<std::string, std::vector<std::string> > clip;
|
||||
|
||||
|
|
Loading…
Reference in New Issue