aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-03-14 17:36:51 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-03-14 17:36:51 +0800
commit5eb187ae03d845e83b78a727533d311643adfd39 (patch)
treebaaeee89921967bc13347f2527160fbc2699a287 /src/common.cpp
parent582cd4c6b680fe9a32ad165b82db34bb60507fea (diff)
downloadadvent-of-code-5eb187ae03d845e83b78a727533d311643adfd39.tar.gz
advent-of-code-5eb187ae03d845e83b78a727533d311643adfd39.zip
next line
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/common.cpp b/src/common.cpp
index d4457c6..be45494 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -20,13 +20,5 @@ line_view load_file(const char* path) {
}
line_view next_line(line_view file) {
- static size_t offset = 0;
- line_view lv;
- lv.line = file.line + offset;
- lv.length = 0;
- while (offset < file.length && file.line[offset] != '\n') {
- lv.length += 1;
- offset++;
- }
- return lv;
+ return {nullptr, 0};
}