diff --git a/day2/p1.c b/day2/p1.c index 522b0e3..58ad326 100644 --- a/day2/p1.c +++ b/day2/p1.c @@ -5,7 +5,7 @@ #include -uint64_t parse_number(char *end); +inline uint64_t parse_number(const char *end); #define SETS_STR_MAX_LEN 200 @@ -66,7 +66,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *end) { +inline uint64_t parse_number(const char *end) { uint64_t num = 0; for (size_t n = 1;; n *= 10) { diff --git a/day2/p2.c b/day2/p2.c index b850dc0..e9747a7 100644 --- a/day2/p2.c +++ b/day2/p2.c @@ -5,7 +5,7 @@ #include -uint64_t parse_number(char *end); +inline uint64_t parse_number(const char *end); #define SETS_STR_MAX_LEN 200 @@ -72,7 +72,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *end) { +inline uint64_t parse_number(const char *end) { uint64_t num = 0; for (size_t n = 1;; n *= 10) { diff --git a/day3/p2.c b/day3/p2.c index bead4db..1e5002c 100644 --- a/day3/p2.c +++ b/day3/p2.c @@ -7,7 +7,7 @@ #define ISDIGIT(c) (c >= 0x30 && c <= 0x39) -uint64_t parse_number(char *line, ssize_t j); +inline uint64_t parse_number(const char *line, ssize_t j); int main(int argc, char **argv) { @@ -101,7 +101,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *line, ssize_t j) { +inline uint64_t parse_number(const char *line, ssize_t j) { uint64_t n = 0; uint64_t multiplier = 1; diff --git a/day4/p1.c b/day4/p1.c index ba08bd9..378d1d7 100644 --- a/day4/p1.c +++ b/day4/p1.c @@ -5,7 +5,7 @@ #include -uint64_t parse_number(char *end); +inline uint64_t parse_number(const char *end); int main(int argc, char **argv) { @@ -66,7 +66,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *end) { +inline uint64_t parse_number(const char *end) { uint64_t num = 0; for (size_t n = 1;; n *= 10) { diff --git a/day4/p2.c b/day4/p2.c index 62764bb..935fa48 100644 --- a/day4/p2.c +++ b/day4/p2.c @@ -8,7 +8,7 @@ #define STACK_SZ UINT8_MAX+1 typedef uint8_t stackpointer_t; -uint64_t parse_number(char *end); +inline uint64_t parse_number(const char *end); int main(int argc, char **argv) { @@ -76,7 +76,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *end) { +inline uint64_t parse_number(const char *end) { uint64_t num = 0; for (size_t n = 1;; n *= 10) { diff --git a/day5/p1.c b/day5/p1.c index b2f454b..a1112b6 100644 --- a/day5/p1.c +++ b/day5/p1.c @@ -5,7 +5,7 @@ #include -int64_t parse_number(char *end); +inline int64_t parse_number(const char *end); int main(int argc, char **argv) { @@ -69,7 +69,7 @@ int main(int argc, char **argv) { return 0; } -int64_t parse_number(char *end) { +inline int64_t parse_number(const char *end) { int64_t num = 0; for (size_t m = 1;; m *= 10) { diff --git a/day5/p2.c b/day5/p2.c index 754d1c0..5c3bfb3 100644 --- a/day5/p2.c +++ b/day5/p2.c @@ -5,7 +5,7 @@ #include -uint64_t parse_number(char *end); +inline uint64_t parse_number(const char *end); #define MAPS_LEN 7 @@ -100,7 +100,7 @@ int main(int argc, char **argv) { return 0; } -uint64_t parse_number(char *end) { +inline uint64_t parse_number(const char *end) { uint64_t num = 0; for (size_t m = 1;; m *= 10) {