Update 2021 sources to pass clang-tidy

This commit is contained in:
2021-12-02 07:31:53 +00:00
parent 87d9b62240
commit 7ab7ecb00a
4 changed files with 16 additions and 15 deletions

View File

@@ -5,18 +5,18 @@
#include <iostream>
#include <string>
int main()
auto main() -> int
{
using namespace std::string_literals;
static const auto fwd{"forward "s};
static const auto down{"down "s};
static const auto up{"up "s};
static const auto up{"up "s}; // NOLINT(readability-identifier-length)
std::string line;
unsigned long horiz{0};
unsigned long depth{0};
unsigned long aim{0};
std::uint64_t horiz{0};
std::uint64_t depth{0};
std::uint64_t aim{0};
while (std::getline(std::cin, line)) {
if (line.size() > fwd.size() && line.substr(0, fwd.size()) == fwd) {
auto dist{std::stoul(line.substr(fwd.size()))};