Update .clang-format file & apply clang-format to whole project

This commit is contained in:
Luis Díaz Más
2022-03-16 17:44:25 +01:00
parent 0641a5f539
commit 30bf563f4d
207 changed files with 71141 additions and 75793 deletions
+38 -39
View File
@@ -36,55 +36,54 @@ static constexpr const char* testcases[] = {
"text",
};
int main()
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
int main() {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXV_ENABLE_BMFF
Exiv2::enableBMFF();
Exiv2::enableBMFF();
#endif
std::cout << std::setfill(' ');
std::cout << std::setfill(' ');
std::cout << std::setw(12) << std::left << "string";
std::cout << std::setw(12) << std::left << "long";
std::cout << std::setw(12) << std::left << "float";
std::cout << std::setw(12) << std::left << "Rational";
std::cout << std::setw(12) << std::left << "string";
std::cout << std::setw(12) << std::left << "long";
std::cout << std::setw(12) << std::left << "float";
std::cout << std::setw(12) << std::left << "Rational";
std::cout << std::endl;
std::cout << std::endl;
for (auto&& testcase : testcases) {
try {
std::string s(testcase);
std::cout << std::setw(12) << std::left << s;
bool ok = false;
for (auto&& testcase : testcases) {
try {
std::string s(testcase);
std::cout << std::setw(12) << std::left << s;
bool ok = false;
const auto l = Exiv2::parseInt64(s, ok);
std::cout << std::setw(12) << std::left;
if (ok)
std::cout << l;
else
std::cout << "nok";
const auto l = Exiv2::parseInt64(s, ok);
std::cout << std::setw(12) << std::left;
if (ok)
std::cout << l;
else
std::cout << "nok";
float f = Exiv2::parseFloat(s, ok);
std::cout << std::setw(12) << std::left;
if (ok)
std::cout << f;
else
std::cout << "nok";
float f = Exiv2::parseFloat(s, ok);
std::cout << std::setw(12) << std::left;
if (ok)
std::cout << f;
else
std::cout << "nok";
Exiv2::Rational r = Exiv2::parseRational(s, ok);
if (ok)
std::cout << r.first << "/" << r.second;
else
std::cout << "nok";
Exiv2::Rational r = Exiv2::parseRational(s, ok);
if (ok)
std::cout << r.first << "/" << r.second;
else
std::cout << "nok";
std::cout << std::endl;
} catch (Exiv2::Error& e) {
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return -1;
}
std::cout << std::endl;
} catch (Exiv2::Error& e) {
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return -1;
}
}
return 0;
return 0;
}