diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-03-18 21:00:08 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-03-18 21:00:08 +0800 |
commit | 057a878b90cc72930a5e4fa312845fec00270a49 (patch) | |
tree | abe815d94ae6d12c10ae99a90f6f3c8073111fa5 /src | |
parent | 0bca03ba3052ff5737a924341c6fd46335e7a731 (diff) | |
download | advent-of-code-057a878b90cc72930a5e4fa312845fec00270a49.tar.gz advent-of-code-057a878b90cc72930a5e4fa312845fec00270a49.zip |
fix tests for mac
Diffstat (limited to 'src')
-rw-r--r-- | src/2015/day6/aoc.cpp | 10 | ||||
-rw-r--r-- | src/CMakeLists.txt | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/2015/day6/aoc.cpp b/src/2015/day6/aoc.cpp index f0ed3a5..71de802 100644 --- a/src/2015/day6/aoc.cpp +++ b/src/2015/day6/aoc.cpp @@ -2,13 +2,13 @@ namespace aoc2015 { std::pair<int, int> day6(line_view file) { - grid<Bit, 1000> grid1; - grid<int8_t, 1000> grid2; + grid<Bit, 1000>* grid1 = new grid<Bit,1000>; + grid<int8_t, 1000>* grid2 = new grid<int8_t, 1000>; per_line(file, [&grid1, &grid2](line_view lv) { - grid1.parse(lv); - grid2.parse(lv); + grid1->parse(lv); + grid2->parse(lv); return true; }); - return {grid1.store_.count(), grid2.store_.count()}; + return {grid1->store_.count(), grid2->store_.count()}; } } // namespace aoc2015 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d9c403..c4fbbbb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,3 +14,4 @@ set(SOLUTION_FILES add_library(solution SHARED ${SOLUTION_FILES}) target_include_directories(solution PRIVATE ${PROJECT_SOURCE_DIR}/src) +target_link_libraries(solution PRIVATE common) |