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

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

Loading…
Cancel
Save