mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
remove use of snprint, fixes Issue 1037
This commit is contained in:
parent
0a654c2d58
commit
acbe8ee5cd
@ -378,12 +378,11 @@ ADD_EXECUTABLE(App_ExampleBrowser
|
||||
${BulletExampleBrowser_SRCS}
|
||||
)
|
||||
|
||||
FILE( MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/data" )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET App_ExampleBrowser
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${BULLET_PHYSICS_SOURCE_DIR}/data ${PROJECT_BINARY_DIR}/data
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink ${BULLET_PHYSICS_SOURCE_DIR}/data ${PROJECT_BINARY_DIR}/data
|
||||
)
|
||||
|
||||
IF (BULLET2_MULTITHREADED_TBB_DEMO AND WIN32)
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#include "OpenGLExampleBrowser.h"
|
||||
|
||||
#include "Bullet3Common/b3CommandLineArgs.h"
|
||||
|
@ -173,9 +173,17 @@ struct BulletMJCFImporterInternalData
|
||||
|
||||
std::string sourceFileLocation(TiXmlElement* e)
|
||||
{
|
||||
#if 0
|
||||
//no C++11 snprintf etc
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s:%i", m_sourceFileName.c_str(), e->Row());
|
||||
return buf;
|
||||
#else
|
||||
char row[1024];
|
||||
sprintf(row,"%d",e->Row());
|
||||
std::string str = m_sourceFileName.c_str() + std::string(":") + std::string(row);
|
||||
return str;
|
||||
#endif
|
||||
}
|
||||
|
||||
const UrdfLink* getLink(int modelIndex, int linkIndex) const
|
||||
|
@ -1679,7 +1679,17 @@ bool UrdfParser::loadSDF(const char* sdfText, ErrorLogger* logger)
|
||||
|
||||
std::string UrdfParser::sourceFileLocation(TiXmlElement* e)
|
||||
{
|
||||
#if 0
|
||||
//no C++11 etc, no snprintf
|
||||
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s:%i", m_urdf2Model.m_sourceFile.c_str(), e->Row());
|
||||
return buf;
|
||||
#else
|
||||
char row[1024];
|
||||
sprintf(row,"%d",e->Row());
|
||||
std::string str = m_urdf2Model.m_sourceFile.c_str() + std::string(":") + std::string(row);
|
||||
return str;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user