Skip to content

Commit

Permalink
numeric limits
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Dec 17, 2023
1 parent 2093678 commit 0117fb1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run tests
run: |
cd build
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose
macos_lateset:
runs-on: macos-latest
Expand All @@ -54,4 +54,4 @@ jobs:
- name: Run tests
run: |
cd build
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run tests
run: |
cd build
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose
clang:
runs-on: ubuntu-latest
Expand All @@ -51,4 +51,4 @@ jobs:
- name: Run tests
run: |
cd build
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10
ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
- name: Test
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
run: cd build ; ctest -C ${{ matrix.build_type }} --output-on-failure
4 changes: 2 additions & 2 deletions src/day5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct Data {
};

long part1(const Data &data) {
long min = LONG_MAX;
long min = std::numeric_limits<long>::max();
for (const auto &seed : data.seeds) {
long location = seed;
for (const auto &ranges : data.ranges) {
Expand All @@ -39,7 +39,7 @@ long part1(const Data &data) {
}

int part2(const Data &data) {
long min = LONG_MAX;
long min = std::numeric_limits<long>::max();
for (size_t i = 0; i < data.seeds.size(); i += 2) {
long start = data.seeds[i];
long n = data.seeds[i + 1];
Expand Down
1 change: 0 additions & 1 deletion src/lib/maths.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <map>
#include <algorithm>
#include <numeric>
#include <cmath>
Expand Down

0 comments on commit 0117fb1

Please sign in to comment.