All: Fix a lot of compiler warnings from header files
While reworking build system, header files started to report warnings.
This commit is contained in:
@@ -168,9 +168,9 @@ bool is_accepted(const Item& item, const BAN::String& name, const Workflows& wor
|
||||
{
|
||||
if (!satifies_rule(item, rule))
|
||||
continue;
|
||||
if (rule.target == "A"sv)
|
||||
if (rule.target == "A"_sv)
|
||||
return true;
|
||||
if (rule.target == "R"sv)
|
||||
if (rule.target == "R"_sv)
|
||||
return false;
|
||||
return is_accepted(item, rule.target, workflows);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ i64 puzzle1(FILE* fp)
|
||||
BAN::Vector<Item> accepted;
|
||||
|
||||
for (const auto& item : items)
|
||||
if (is_accepted(item, "in"sv, workflows))
|
||||
if (is_accepted(item, "in"_sv, workflows))
|
||||
MUST(accepted.push_back(item));
|
||||
|
||||
i64 result = 0;
|
||||
@@ -243,7 +243,7 @@ i64 puzzle2(FILE* fp)
|
||||
values_sorted[2][ai],
|
||||
values_sorted[3][si]
|
||||
}};
|
||||
if (!is_accepted(item, "in"sv, workflows))
|
||||
if (!is_accepted(item, "in"_sv, workflows))
|
||||
continue;
|
||||
|
||||
i64 x_count = values_sorted[0][xi + 1] - values_sorted[0][xi];
|
||||
|
||||
@@ -137,7 +137,7 @@ i64 puzzle1(FILE* fp)
|
||||
|
||||
for (size_t i = 0; i < 1000; i++)
|
||||
{
|
||||
MUST(signal_queue.push({ "broadcaster"sv, ""sv, false }));
|
||||
MUST(signal_queue.push({ "broadcaster"_sv, ""_sv, false }));
|
||||
while (!signal_queue.empty())
|
||||
{
|
||||
auto signal = signal_queue.front();
|
||||
|
||||
@@ -45,8 +45,8 @@ i64 puzzle1(FILE* fp)
|
||||
}
|
||||
}
|
||||
|
||||
u32 current = coord_to_u32("AAA"sv);
|
||||
u32 target = coord_to_u32("ZZZ"sv);
|
||||
u32 current = coord_to_u32("AAA"_sv);
|
||||
u32 target = coord_to_u32("ZZZ"_sv);
|
||||
|
||||
i64 steps = 0;
|
||||
for (; current != target; steps++)
|
||||
|
||||
Reference in New Issue
Block a user