diff --git a/day12.c3 b/day12.c3 index bed1d1b..1d37481 100644 --- a/day12.c3 +++ b/day12.c3 @@ -3,7 +3,7 @@ import std::io; import std::math; import std::collections::list; -def MapList = List; +def MapList = List(); struct Map { @@ -73,7 +73,7 @@ fn Map* load_heightmap() { @pool() { - String line = f.getline().str(); + String line = f.getline().as_str(); foreach (int i, &c : line) { if (*c == 'S') diff --git a/day13.c3 b/day13.c3 index 46a562e..1a4bc86 100644 --- a/day13.c3 +++ b/day13.c3 @@ -9,11 +9,11 @@ struct PacketPair Packet* p2; } -def PacketList = List; +def PacketList = List(); -def Packet = List; +def Packet = List(); -def PacketPairs = List; +def PacketPairs = List(); struct PacketElement { diff --git a/day15.c3 b/day15.c3 index 8acda06..a13e061 100644 --- a/day15.c3 +++ b/day15.c3 @@ -4,7 +4,7 @@ import std::math; import std::collections::list; import std::collections::priorityqueue; -def CoordPairList = List][2]>; +def CoordPairList = List(][2]>); fn int[<2>]! parse_coord(String s) { diff --git a/day16.c3 b/day16.c3 index 720a245..b2c0302 100644 --- a/day16.c3 +++ b/day16.c3 @@ -4,8 +4,8 @@ import std::math; import std::collections::map; import std::collections::list; -def ValveMap = HashMap; -def IntPairList = List]>; +def ValveMap = HashMap(); +def IntPairList = List(]>); ValveMap v; struct Valve diff --git a/day17.c3 b/day17.c3 index bc72c06..fe80cac 100644 --- a/day17.c3 +++ b/day17.c3 @@ -4,7 +4,7 @@ import std::math; import std::collections::map; import std::collections::list; -def StateCacheMap = HashMap; +def StateCacheMap = HashMap(); struct StateCache { @@ -273,6 +273,6 @@ fn void main() { DString s = load_jets(); defer s.free(); - solve(s.str(), 2022); - solve(s.str(), 1000000000000i64); + solve(s.as_str(), 2022); + solve(s.as_str(), 1000000000000i64); } \ No newline at end of file diff --git a/day19.c3 b/day19.c3 index 6e16042..fbeee48 100644 --- a/day19.c3 +++ b/day19.c3 @@ -4,7 +4,7 @@ import std::math; import std::collections::map; import std::collections::list; -def BlueprintList = List; +def BlueprintList = List(); const usz ORE = 0; const usz CLAY = 1; diff --git a/day20.c3 b/day20.c3 index 7d9e6c1..41e5bfc 100644 --- a/day20.c3 +++ b/day20.c3 @@ -4,7 +4,7 @@ import std::math; import std::collections::map; import std::collections::list; -def LongList = List; +def LongList = List(); fn void load_crypto(LongList* list, LongList* pos, long key) { diff --git a/day21.c3 b/day21.c3 index a2e2cd2..3a208dc 100644 --- a/day21.c3 +++ b/day21.c3 @@ -4,8 +4,8 @@ import std::math; import std::collections::map; import std::collections::list; -def MonkeyList = List; -def NameMap = HashMap; +def MonkeyList = List(); +def NameMap = HashMap(); enum Action { diff --git a/day23.c3 b/day23.c3 index 43dba52..ec3d3cf 100644 --- a/day23.c3 +++ b/day23.c3 @@ -3,7 +3,7 @@ import std::io; import std::math; import std::collections::list; -def CharsArray = List; +def CharsArray = List(); // Pick a padding that doesn't hit the asserts. const int PADDING = 100; diff --git a/day24.c3 b/day24.c3 index 5bb798d..8669dc8 100644 --- a/day24.c3 +++ b/day24.c3 @@ -3,7 +3,7 @@ import std::io; import std::math; import std::collections::list; -def CharsArray = List; +def CharsArray = List(); const int PADDING = 100; diff --git a/day3.c3 b/day3.c3 index c3a3280..a11bcb6 100644 --- a/day3.c3 +++ b/day3.c3 @@ -2,7 +2,7 @@ module day3; import std::io; import std::collections::map; -def CharSet = HashMap; +def CharSet = HashMap(); fn int evaluate(char c) { diff --git a/day5.c3 b/day5.c3 index a207afc..ebefd9d 100644 --- a/day5.c3 +++ b/day5.c3 @@ -2,7 +2,7 @@ module day5; import std::io; import std::collections::list; -def CharList = list::List; +def CharList = list::List(); const MAX_PILES = 20; diff --git a/day7.c3 b/day7.c3 index 166b5dd..cca45c5 100644 --- a/day7.c3 +++ b/day7.c3 @@ -2,7 +2,7 @@ module day7; import std::collections::list; import std::io; -def DirList = List; +def DirList = List(); struct Directory { diff --git a/day8.c3 b/day8.c3 index 517a68e..bdbfbd4 100644 --- a/day8.c3 +++ b/day8.c3 @@ -2,7 +2,7 @@ module day8; import std::collections::list; import std::io; -def Forest = distinct List; +def Forest = distinct inline List(); fn Forest* parse_forest() { File f = file::open("forest.txt", "rb")!!;