aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-06 23:10:53 +0100
committer hop311 <hop3114@gmail.com>2023-12-07 21:38:17 +0100
commit398377011cb3d3c970451dcd215f3610159f1ae2 (patch)
tree2a73255f595eabb1441419a08bd0d5e5407213e7 /src/openvic-simulation/dataloader/NodeTools.cpp
parent48a3f1729d709847d7cad33f594c77cac414e802 (diff)
Vec/set callbacks + crime file + prov building pos
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.cpp')
-rw-r--r--src/openvic-simulation/dataloader/NodeTools.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.cpp b/src/openvic-simulation/dataloader/NodeTools.cpp
index 12e51a4..c4addb7 100644
--- a/src/openvic-simulation/dataloader/NodeTools.cpp
+++ b/src/openvic-simulation/dataloader/NodeTools.cpp
@@ -380,17 +380,7 @@ node_callback_t NodeTools::name_list_callback(callback_t<std::vector<std::string
return [callback](ast::NodeCPtr node) -> bool {
std::vector<std::string> list;
bool ret = expect_list_reserve_length(
- list,
- expect_identifier_or_string(
- [&list](std::string_view str) -> bool {
- if (!str.empty()) {
- list.push_back(std::string { str });
- return true;
- }
- Logger::error("Empty identifier or string");
- return false;
- }
- )
+ list, expect_identifier_or_string(vector_callback<std::string_view>(list))
)(node);
ret &= callback(std::move(list));
return ret;