aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-09-03 20:56:31 +0200
committer GitHub <noreply@github.com>2023-09-03 20:56:31 +0200
commit027828532837673a3631c8a9a8128f9b89a9db43 (patch)
tree9d349c3f1da07b8f7207fd0420dcb6d84caa4007
parentf55e1fc6090854dab49f994c41644a6cd86a5d44 (diff)
parent4588ae6ca889306fc5b7c7067540f5eee97ad86f (diff)
Merge pull request #10 from OpenVicProject/fix/csv-problems
-rw-r--r--include/openvic-dataloader/csv/Parser.hpp2
-rw-r--r--src/openvic-dataloader/csv/Parser.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/openvic-dataloader/csv/Parser.hpp b/include/openvic-dataloader/csv/Parser.hpp
index 3497864..0bd0670 100644
--- a/include/openvic-dataloader/csv/Parser.hpp
+++ b/include/openvic-dataloader/csv/Parser.hpp
@@ -24,7 +24,7 @@ namespace ovdl::csv {
bool parse_csv();
- const std::vector<csv::LineObject> get_lines() const;
+ const std::vector<csv::LineObject>& get_lines() const;
Parser(Parser&&);
Parser& operator=(Parser&&);
diff --git a/src/openvic-dataloader/csv/Parser.cpp b/src/openvic-dataloader/csv/Parser.cpp
index 8a99085..45f3142 100644
--- a/src/openvic-dataloader/csv/Parser.cpp
+++ b/src/openvic-dataloader/csv/Parser.cpp
@@ -148,4 +148,8 @@ bool Parser::parse_csv() {
}
_lines = std::move(_buffer_handler->get_lines());
return true;
+}
+
+const std::vector<csv::LineObject>& Parser::get_lines() const {
+ return _lines;
} \ No newline at end of file