diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index 04153de75..2ea28824e 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -50,7 +50,9 @@ using namespace std; //#include "boost/format.hpp" //#include "boost/foreach.hpp" -using namespace boost; +//using namespace boost; + +#include "TinyFormatter.h" #include "OgreImporter.h" #include "irrXMLWrapper.h" @@ -113,7 +115,7 @@ void OgreImporter::InternReadFile(const std::string &pFile, aiScene *pScene, Ass //-------------------Read the submeshs and materials:----------------------- - std::list > SubMeshes; + std::list > SubMeshes; vector Materials; XmlRead(MeshFile); while(MeshFile->getNodeName()==string("submesh")) @@ -127,7 +129,7 @@ void OgreImporter::InternReadFile(const std::string &pFile, aiScene *pScene, Ass //so it is important to do this before pushing the mesh in the vector! theSubMesh->MaterialIndex=SubMeshes.size(); - SubMeshes.push_back(shared_ptr(theSubMesh)); + SubMeshes.push_back(boost::shared_ptr(theSubMesh)); //Load the Material: aiMaterial* MeshMat=LoadMaterial(theSubMesh->MaterialName); @@ -170,7 +172,7 @@ void OgreImporter::InternReadFile(const std::string &pFile, aiScene *pScene, Ass //create the aiMehs... vector aiMeshes; - BOOST_FOREACH(shared_ptr theSubMesh, SubMeshes) + BOOST_FOREACH(boost::shared_ptr theSubMesh, SubMeshes) { aiMeshes.push_back(CreateAssimpSubMesh(*theSubMesh, Bones)); } @@ -318,8 +320,11 @@ void OgreImporter::ReadSubMesh(SubMesh &theSubMesh, XmlReader *Reader) }//end of boneassignments } - DefaultLogger::get()->debug(str(format("Positionen: %1% Normale: %2% TexCoords: %3%") - % theSubMesh.Positions.size() % theSubMesh.Normals.size() % theSubMesh.Uvs.size())); + DefaultLogger::get()->debug((Formatter::format(), + "Positionen: ",theSubMesh.Positions.size(), + " Normale: ",theSubMesh.Normals.size(), + " TexCoords: ",theSubMesh.Uvs.size() + )); DefaultLogger::get()->warn(Reader->getNodeName()); @@ -578,7 +583,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector &Bones, vecto if(!IdsOk) throw DeadlyImportError("Bone Ids are not valid!"+FileName); } - DefaultLogger::get()->debug(str(format("Number of bones: %1%") % Bones.size())); + DefaultLogger::get()->debug((Formatter::format(),"Number of bones: ",Bones.size())); //________________________________________________________________________________ diff --git a/code/OgreImporterMaterial.cpp b/code/OgreImporterMaterial.cpp index aafa2ced8..93a03e301 100644 --- a/code/OgreImporterMaterial.cpp +++ b/code/OgreImporterMaterial.cpp @@ -53,11 +53,11 @@ using namespace std; //#include "boost/format.hpp" //#include "boost/foreach.hpp" -using namespace boost; +//using namespace boost; #include "OgreImporter.h" #include "irrXMLWrapper.h" - +#include "TinyFormatter.h" namespace Assimp { @@ -100,8 +100,8 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const */ - string MaterialFileName=m_CurrentFilename.substr(0, m_CurrentFilename.find('.'))+".material"; - DefaultLogger::get()->info(str(format("Trying to load %1%") % MaterialFileName)); + const string MaterialFileName=m_CurrentFilename.substr(0, m_CurrentFilename.find('.'))+".material"; + DefaultLogger::get()->info("Trying to load " +MaterialFileName); //Read the file into memory and put it in a stringstream stringstream ss; @@ -116,7 +116,7 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const return NewMaterial; } } - scoped_ptr MaterialFile(MatFilePtr); + boost::scoped_ptr MaterialFile(MatFilePtr); vector FileData(MaterialFile->FileSize()); MaterialFile->Read(&FileData[0], MaterialFile->FileSize(), 1); BaseImporter::ConvertToUTF8(FileData);