avoid newer clang-format issue

More readable anyway.

Also remove specific version. Problems have been fixed already. All
versions should work the same now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 2 years ago
parent 50eca1696e
commit 7477293e41

@ -13,5 +13,4 @@ jobs:
source: '.' source: '.'
exclude: './xmpsdk ./contrib' exclude: './xmpsdk ./contrib'
extensions: 'c,h,cpp,hpp' extensions: 'c,h,cpp,hpp'
clangFormatVersion: 12
style: file style: file

@ -62,10 +62,14 @@ class Options {
virtual ~Options() = default; virtual ~Options() = default;
}; };
enum { resultOK = 0, resultSyntaxError, resultSelectFailed }; enum {
resultOK = 0,
resultSyntaxError,
resultSelectFailed,
};
enum // keyword indices // keyword indices
{ enum {
kwHELP = 0, kwHELP = 0,
kwVERSION, kwVERSION,
kwDST, kwDST,
@ -75,13 +79,10 @@ enum // keyword indices
kwADJUST, kwADJUST,
kwTZ, kwTZ,
kwDELTA, kwDELTA,
kwMAX // manages keyword array kwMAX, // manages keyword array
, kwNEEDVALUE, // bogus keywords for error reporting
kwNEEDVALUE // bogus keywords for error reporting kwSYNTAX, // -- ditto --
, kwNOVALUE = -kwVERBOSE, // keywords <= kwNOVALUE are flags (no value needed)
kwSYNTAX // -- ditto --
,
kwNOVALUE = -kwVERBOSE // keywords <= kwNOVALUE are flags (no value needed)
}; };
// file types supported // file types supported
@ -625,10 +626,13 @@ int getFileType(std::string& path, Options& options) {
return getFileType(path.c_str(), options); return getFileType(path.c_str(), options);
} }
int getFileType(const char* path, Options& options) { int getFileType(const char* path, Options& options) {
return readXML(path, options) ? typeXML if (readXML(path, options))
: readDir(path, options) ? typeDirectory return typeXML;
: readImage(path, options) ? typeImage if (readDir(path, options))
: readFile(path, options); return typeDirectory;
if (readImage(path, options))
return typeImage;
return readFile(path, options);
} }
int version(const char* program) { int version(const char* program) {

@ -360,9 +360,8 @@ void Jp2Image::readMetadata() {
break; break;
} }
default: { default:
break; break;
}
} }
lastBoxTypeRead = box.type; lastBoxTypeRead = box.type;

@ -302,9 +302,8 @@ void PsdImage::readResourceBlock(uint16_t resourceId, uint32_t resourceSize) {
break; break;
} }
default: { default:
break; break;
}
} }
} // PsdImage::readResourceBlock } // PsdImage::readResourceBlock

@ -1004,7 +1004,20 @@ void printNode(const std::string& schemaNs, const std::string& propPath, const s
std::cout << "ashisabsals\n" std::cout << "ashisabsals\n"
<< "lcqqtrgqlai\n"; << "lcqqtrgqlai\n";
} }
enum { alia = 0, sche, hasq, isqu, stru, arra, abag, aseq, aalt, lang, simp, len }; enum {
alia = 0,
sche,
hasq,
isqu,
stru,
arra,
abag,
aseq,
aalt,
lang,
simp,
len,
};
std::string opts(len, '.'); std::string opts(len, '.');
if (XMP_PropIsAlias(opt)) if (XMP_PropIsAlias(opt))

Loading…
Cancel
Save