forked from teamnwah/openmw-tes3coop
replace sprintf() with boost::format
This commit is contained in:
parent
aa5f63ffcc
commit
d5e63a767e
1 changed files with 5 additions and 8 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "BtOgreExtras.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#define BIT(x) (1<<(x))
|
||||
|
||||
|
@ -333,10 +334,8 @@ namespace Physic
|
|||
|
||||
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
||||
{
|
||||
char uniqueID[8];
|
||||
sprintf( uniqueID, "%07.3f", scale );
|
||||
std::string sid = uniqueID;
|
||||
std::string outputstring = mesh + uniqueID;
|
||||
std::string sid = (boost::format("%07.3f") % scale).str();
|
||||
std::string outputstring = mesh + sid;
|
||||
//std::cout << "The string" << outputstring << "\n";
|
||||
|
||||
//get the shape from the .nif
|
||||
|
@ -571,10 +570,8 @@ namespace Physic
|
|||
|
||||
void PhysicEngine::getObjectAABB(const std::string &mesh, float scale, btVector3 &min, btVector3 &max)
|
||||
{
|
||||
char uniqueID[8];
|
||||
sprintf( uniqueID, "%07.3f", scale );
|
||||
std::string sid = uniqueID;
|
||||
std::string outputstring = mesh + uniqueID;
|
||||
std::string sid = (boost::format("%07.3f") % scale).str();
|
||||
std::string outputstring = mesh + sid;
|
||||
|
||||
mShapeLoader->load(outputstring, "General");
|
||||
BulletShapeManager::getSingletonPtr()->load(outputstring, "General");
|
||||
|
|
Loading…
Reference in a new issue