mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Fixed some warnings on VisualStudio2010
This commit is contained in:
@@ -172,7 +172,7 @@ std::string uBytes2Hex(const char * bytes, unsigned int bytesLen)
|
||||
|
||||
std::vector<char> uHex2Bytes(const std::string & hex)
|
||||
{
|
||||
return uHex2Bytes(&hex[0], hex.length());
|
||||
return uHex2Bytes(&hex[0], (int)hex.length());
|
||||
}
|
||||
|
||||
std::vector<char> uHex2Bytes(const char * hex, int hexLen)
|
||||
@@ -287,7 +287,11 @@ std::string uFormatv (const char *fmt, va_list args)
|
||||
#endif
|
||||
|
||||
// Try to vsnprintf into our buffer.
|
||||
#ifdef _MSC_VER
|
||||
int needed = vsnprintf_s(buf, size, size, fmt, argsTmp);
|
||||
#else
|
||||
int needed = vsnprintf (buf, size, fmt, argsTmp);
|
||||
#endif
|
||||
va_end(argsTmp);
|
||||
// NB. C99 (which modern Linux and OS X follow) says vsnprintf
|
||||
// failure returns the length it would have needed. But older
|
||||
|
||||
Reference in New Issue
Block a user