aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-12-07 22:04:05 +0100
committer GitHub <noreply@github.com>2023-12-07 22:04:05 +0100
commit085fe94212c6f0ddbdfca1b2ba58223e7f6dcc8a (patch)
tree2a73255f595eabb1441419a08bd0d5e5407213e7 /src/openvic-simulation/dataloader/NodeTools.cpp
parent48a3f1729d709847d7cad33f594c77cac414e802 (diff)
parent398377011cb3d3c970451dcd215f3610159f1ae2 (diff)
Merge pull request #85 from OpenVicProject/container-callbacks
Container (pointer) callbacks + format cleanup
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;