chore: forgot clang-format on recent changes

This commit is contained in:
Michael Werle 2023-08-29 16:54:08 +09:00
parent 6ceaa401e2
commit fb9a799fd4
7 changed files with 16 additions and 19 deletions

View File

@ -1,12 +1,10 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_compile_options(-Werror=switch)
# Uncomment to compile with more warnings
#add_compile_options(-Wall)
# Uncomment to compile with even more warnings
#add_compile_options(-Wextra)
# TODO: currently there are too many unused parameters which overwhelms the
# warning output with `-Wall`. So let's leave fixing these for later.
# Uncomment to compile with more warnings add_compile_options(-Wall) Uncomment
# to compile with even more warnings add_compile_options(-Wextra) TODO:
# currently there are too many unused parameters which overwhelms the warning
# output with `-Wall`. So let's leave fixing these for later.
add_compile_options(-Wno-unused-parameter)
add_subdirectory(util)

View File

@ -481,7 +481,7 @@ QColor CustomTheme::heatMap(HeatMap color) {
return QColor(heatmap.value("cold").toString());
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(color)));
std::to_string(static_cast<int>(color)));
}
QColor CustomTheme::remoteComment(Comment color) {
@ -498,7 +498,7 @@ QColor CustomTheme::remoteComment(Comment color) {
return QColor(comment.value("timestamp").toString());
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(color)));
std::to_string(static_cast<int>(color)));
}
QColor CustomTheme::star() {

View File

@ -173,7 +173,7 @@ QString Settings::promptDescription(Prompt::Kind kind) const {
return tr("Prompt to stage large files");
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(kind)));
std::to_string(static_cast<int>(kind)));
}
void Settings::setHotkey(const QString &action, const QString &hotkey) {

View File

@ -199,7 +199,7 @@ void Diff::sort(SortRole role, Qt::SortOrder order) {
}
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(role)));
std::to_string(static_cast<int>(role)));
});
}

View File

@ -265,7 +265,8 @@ QByteArray Patch::lineContent(int hidx, int ln) const {
const git_diff_line *line = nullptr;
int result = git_patch_get_line_in_hunk(&line, d.data(), hidx, ln);
return (GIT_OK == result) ? QByteArray(line->content, line->content_len) : QByteArray();
return (GIT_OK == result) ? QByteArray(line->content, line->content_len)
: QByteArray();
}
Patch::ConflictResolution Patch::conflictResolution(int hidx) {

View File

@ -30,10 +30,8 @@ const QString kThemeIconFmt = ":/%1_%2.png";
} // namespace
Account::Account(const QString &username)
: mUsername(username),
mError(new AccountError(this)),
mProgress(new AccountProgress(this)),
mMgr(new QNetworkAccessManager()) {
: mUsername(username), mError(new AccountError(this)),
mProgress(new AccountProgress(this)), mMgr(new QNetworkAccessManager()) {
QObject::connect(
mMgr, &QNetworkAccessManager::sslErrors,
[this](QNetworkReply *reply, const QList<QSslError> &errors) {
@ -207,7 +205,7 @@ QString Account::helpText(Kind kind) {
return QString();
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(kind)));
std::to_string(static_cast<int>(kind)));
}
QString Account::defaultUrl(Kind kind) {
@ -224,7 +222,7 @@ QString Account::defaultUrl(Kind kind) {
return GitLab::defaultUrl();
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(kind)));
std::to_string(static_cast<int>(kind)));
}
Account::Kind Account::kindFromString(const QString &kind, bool *ok) {
@ -265,7 +263,7 @@ QString Account::kindToString(Kind kind) {
return "gitlab";
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(kind)));
std::to_string(static_cast<int>(kind)));
}
void Account::startProgress() {

View File

@ -615,7 +615,7 @@ QVariant Plugin::optionValue(const QString &key) const {
return config().value<QString>(kKeyFmt.arg(mName, key), value.toString());
}
throw std::runtime_error("unreachable; value=" +
std::to_string(static_cast<int>(optionKind(key))));
std::to_string(static_cast<int>(optionKind(key))));
}
Plugin::OptionKind Plugin::optionKind(const QString &key) const {