Skip to content

Commit 68dcc9b

Browse files
committed
semantics
1 parent b64b3eb commit 68dcc9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MenuLayer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ class $modify(MyMenuLayer, MenuLayer) {
3232
}
3333

3434
std::string formattedProblemsList = "";
35-
if (std::vector<LoadProblem> problems = mod->getAllProblems(); !problems.empty()) {
35+
const std::vector<LoadProblem> problems = mod->getAllProblems();
36+
const bool hasNoProblems = problems.empty();
37+
if (!hasNoProblems) {
3638
formattedProblemsList = " {";
3739
for (const auto [type, cause, message] : problems) {
3840
if (type == LoadProblem::Type::Suggestion || type == LoadProblem::Type::Recommendation) continue;
@@ -50,7 +52,7 @@ class $modify(MyMenuLayer, MenuLayer) {
5052

5153
const std::string& formattedModListItem = fmt::format(
5254
"- {}{}</c> {} {} [{}]{}",
53-
mod->isEnabled() ? "<cg>" : "<c-FF0000>",
55+
mod->isEnabled() ? "<cg>" : hasNoProblems ? "<cy>" : "<c-FF0000>",
5456
mod->getName(), mod->getVersion().toVString(), formattedByline,
5557
modID, formattedProblemsList
5658
);

0 commit comments

Comments
 (0)