Fix linter messages
This commit is contained in:
parent
0b70db7670
commit
99c31bc0ea
@ -134,7 +134,7 @@ int64_t ChronospatialComputer::findQuineState()
|
||||
// number (from 'program_'). The target output numbers are considered in reverse order.
|
||||
while (i > 0)
|
||||
{
|
||||
auto patterns = outputPatterns[program_[i - 1]];
|
||||
auto& patterns = outputPatterns[program_[i - 1]];
|
||||
auto it = std::find_if(patterns.begin(), patterns.end(),
|
||||
[&lastAppend, &result, &masks](auto& x) {
|
||||
return lastAppend < x.first && (result & masks[x.first]) == x.second; });
|
||||
|
@ -94,7 +94,7 @@ int64_t ClawContraption::calcTokenCost(const Point2& buttonA, const Point2& butt
|
||||
const int64_t offset)
|
||||
{
|
||||
int64_t p{ (prize.y + offset) * buttonB.x - (prize.x + offset) * buttonB.y };
|
||||
int64_t q{ buttonA.y * buttonB.x - buttonA.x * buttonB.y };
|
||||
int64_t q{ static_cast<int64_t>(buttonA.y) * buttonB.x - static_cast<int64_t>(buttonA.x) * buttonB.y };
|
||||
int64_t a{ p / q };
|
||||
if (a * q != p || (offset == 0 && a > getNMaxButtonPushes()))
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ void DiskFragmenter::moveWholeFiles(const std::string& line)
|
||||
|
||||
// Contains indices of the next empty space with at least as many blocks as their index. 'emptySpaceIndices[0]' is
|
||||
// not used, but included for convenience of accessing the other values by index.
|
||||
DigitIndexArray emptySpaceIndices;
|
||||
DigitIndexArray emptySpaceIndices{};
|
||||
emptySpaceIndices.fill(0);
|
||||
|
||||
while (back > 0)
|
||||
@ -121,7 +121,7 @@ void DiskFragmenter::moveWholeFiles(const std::string& line)
|
||||
{
|
||||
if (front >= back)
|
||||
{
|
||||
position -= getDigit(line, back) + getDigit(line, back - 1);
|
||||
position -= getDigit(line, back) + static_cast<size_t>(getDigit(line, back - 1));
|
||||
}
|
||||
moveBackFileForward(back, backIdNumber, nBackBlocks, emptySpaces[emptySpaceIndices[nBackBlocks]]);
|
||||
UpdateEmptySpaceIndices(emptySpaces, emptySpaceIndices);
|
||||
|
Loading…
x
Reference in New Issue
Block a user