use unsigned
This commit is contained in:
parent
c18cb831ff
commit
c49493733a
@ -35,8 +35,8 @@ char at_loc(const Grid &grid, size_t row, size_t col) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Location find_start(const Grid &grid) {
|
Location find_start(const Grid &grid) {
|
||||||
for (int64_t row{0}; row < grid.size(); ++row) {
|
for (size_t row{0}; row < grid.size(); ++row) {
|
||||||
for (int64_t col{0}; col < grid[row].length(); ++col) {
|
for (size_t col{0}; col < grid[row].length(); ++col) {
|
||||||
if (grid[row][col] == 'S') {
|
if (grid[row][col] == 'S') {
|
||||||
return {row, col};
|
return {row, col};
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ uint64_t part_1(const Grid &grid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void insert_or_increment(std::map<size_t, uint64_t> &cols, size_t col,
|
void insert_or_increment(std::map<size_t, uint64_t> &cols, size_t col,
|
||||||
int64_t value) {
|
uint64_t value) {
|
||||||
auto iter = cols.find(col);
|
auto iter = cols.find(col);
|
||||||
if (iter == cols.end()) {
|
if (iter == cols.end()) {
|
||||||
cols.insert({col, value});
|
cols.insert({col, value});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user