Auto-formatting done by the IDE while touching code in the previous commits

v0.27.3
Luis Díaz Más 8 years ago
parent 8b049922d7
commit bfe057ca20

@ -1635,10 +1635,10 @@ namespace Exiv2 {
#ifdef DEBUG #ifdef DEBUG
std::cerr << "RemoteIo::close totalRead_ = " << p_->totalRead_ << std::endl; std::cerr << "RemoteIo::close totalRead_ = " << p_->totalRead_ << std::endl;
#endif #endif
if ( bigBlock_ ) { if ( bigBlock_ ) {
delete [] bigBlock_; delete [] bigBlock_;
bigBlock_=NULL; bigBlock_=NULL;
} }
return 0; return 0;
} }
@ -1855,7 +1855,7 @@ namespace Exiv2 {
#ifdef DEBUG #ifdef DEBUG
std::cerr << "RemoteIo::mmap nRealData = " << nRealData << std::endl; std::cerr << "RemoteIo::mmap nRealData = " << nRealData << std::endl;
#endif #endif
} }
return bigBlock_; return bigBlock_;
} }

@ -239,8 +239,8 @@ namespace Exiv2 {
Protocol fileProtocol(const std::string& path) { Protocol fileProtocol(const std::string& path) {
Protocol result = pFile ; Protocol result = pFile ;
struct { struct {
std::string name ; std::string name ;
Protocol prot ; Protocol prot ;
} prots[] = } prots[] =
{ { "http://" ,pHttp } { { "http://" ,pHttp }
, { "https://" ,pHttps } , { "https://" ,pHttps }
@ -252,8 +252,8 @@ namespace Exiv2 {
, { "-" ,pStdin } , { "-" ,pStdin }
}; };
for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ ) for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ )
if ( path.find(prots[i].name) == 0 ) if ( path.find(prots[i].name) == 0 )
result = prots[i].prot; result = prots[i].prot;
return result; return result;
} // fileProtocol } // fileProtocol
@ -261,8 +261,8 @@ namespace Exiv2 {
Protocol fileProtocol(const std::wstring& wpath) { Protocol fileProtocol(const std::wstring& wpath) {
Protocol result = pFile ; Protocol result = pFile ;
struct { struct {
std::wstring wname ; std::wstring wname ;
Protocol prot ; Protocol prot ;
} prots[] = } prots[] =
{ { L"http://" ,pHttp } { { L"http://" ,pHttp }
, { L"https://" ,pHttps } , { L"https://" ,pHttps }
@ -274,21 +274,21 @@ namespace Exiv2 {
, { L"-" ,pStdin } , { L"-" ,pStdin }
}; };
for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ ) for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ )
if ( wpath.find(prots[i].wname) == 0 ) if ( wpath.find(prots[i].wname) == 0 )
result = prots[i].prot; result = prots[i].prot;
return result; return result;
} // fileProtocol } // fileProtocol
#endif #endif
bool fileExists(const std::string& path, bool ct) bool fileExists(const std::string& path, bool ct)
{ {
// special case: accept "-" (means stdin) // special case: accept "-" (means stdin)
if (path.compare("-") == 0 || fileProtocol(path)) { if (path.compare("-") == 0 || fileProtocol(path)) {
return true; return true;
} }
struct stat buf; struct stat buf;
int ret = ::stat(path.c_str(), &buf); int ret = ::stat(path.c_str(), &buf);
if (0 != ret) return false; if (0 != ret) return false;
if (ct && !S_ISREG(buf.st_mode)) return false; if (ct && !S_ISREG(buf.st_mode)) return false;
return true; return true;
@ -297,9 +297,9 @@ namespace Exiv2 {
#ifdef EXV_UNICODE_PATH #ifdef EXV_UNICODE_PATH
bool fileExists(const std::wstring& wpath, bool ct) bool fileExists(const std::wstring& wpath, bool ct)
{ {
// special case: accept "-" (means stdin) // special case: accept "-" (means stdin)
if (wpath.compare(L"-") == 0 || fileProtocol(wpath)) { if (wpath.compare(L"-") == 0 || fileProtocol(wpath)) {
return true; return true;
} }
struct _stat buf; struct _stat buf;

Loading…
Cancel
Save