Skip to content

Commit 30daf27

Browse files
committed
Fixes compilation wtih clang
1 parent 6470bfa commit 30daf27

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/api/expenses_api.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ std::pair<std::vector<std::string_view>, std::vector<std::vector<std::string_vie
166166
std::vector<std::string_view> columns;
167167
std::vector<std::vector<std::string_view>> values;
168168

169-
for (auto line : std::views::split(file_content, '\n')) {
169+
for (auto line : budget::splitv(file_content, '\n')) {
170170
// Skip empty lines
171-
if (std::string_view(line).empty()) {
171+
if (line.empty()) {
172172
continue;
173173
}
174174

175175
if (columns.empty()) {
176-
for (const auto& column : std::views::split(line, sep)) {
177-
columns.emplace_back(clean_string(std::string_view(column)));
176+
for (const auto& column : budget::splitv(line, sep)) {
177+
columns.emplace_back(clean_string(column));
178178
}
179179

180180
continue;
@@ -185,9 +185,7 @@ std::pair<std::vector<std::string_view>, std::vector<std::vector<std::string_vie
185185
std::string_view column_acc;
186186
bool acc = false;
187187

188-
for (const auto& column : std::views::split(line, sep)) {
189-
std::string_view column_sv(column);
190-
188+
for (const auto& column_sv : budget::splitv(line, sep)) {
191189
// Very simple algorithm to handle separators in between quotes
192190
if (column_sv.front() == '\"' && column_sv.back() != '\"') {
193191
column_acc = column_sv;

0 commit comments

Comments
 (0)