mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
Fixed some warnings on VisualStudio2010
This commit is contained in:
@@ -36,12 +36,12 @@ bool UFile::exists(const std::string &filePath)
|
||||
|
||||
long UFile::length(const std::string &filePath)
|
||||
{
|
||||
long fileSize = 0;
|
||||
FILE* fp = 0;
|
||||
long fileSize = 0;
|
||||
FILE* fp = 0;
|
||||
#ifdef _MSC_VER
|
||||
fopen_s(&fp, filePath.c_str(), "rb");
|
||||
#else
|
||||
fp = fopen(filePath.c_str(), "rb");
|
||||
fopen_s(&fp, filePath.c_str(), "rb");
|
||||
#else
|
||||
fp = fopen(filePath.c_str(), "rb");
|
||||
#endif
|
||||
if(fp == NULL)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ std::string UFile::getName(const std::string & filePath)
|
||||
{
|
||||
std::string fullPath = filePath;
|
||||
std::string name;
|
||||
for(int i=fullPath.size()-1; i>=0; --i)
|
||||
for(int i=(int)fullPath.size()-1; i>=0; --i)
|
||||
{
|
||||
if(fullPath[i] == '/' || fullPath[i] == '\\')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user