aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-13 21:33:26 -0700
committerrtk0c <[email protected]>2021-06-13 21:33:26 -0700
commit90796ccce3ef9087c1288d737738f65e188cff0b (patch)
tree6127c3833577af6cac3942736a0d357c96ea3786 /core/src/Model/Workflow
parentbdee9dd0c92865e0cec2f4bbf170959df282a930 (diff)
Add table UI and single cell properties
Diffstat (limited to 'core/src/Model/Workflow')
-rw-r--r--core/src/Model/Workflow/Workflow_Main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/Model/Workflow/Workflow_Main.cpp b/core/src/Model/Workflow/Workflow_Main.cpp
index 77b64d3..af5103d 100644
--- a/core/src/Model/Workflow/Workflow_Main.cpp
+++ b/core/src/Model/Workflow/Workflow_Main.cpp
@@ -10,7 +10,9 @@
#include <imgui_node_editor.h>
#include <imgui_stdlib.h>
#include <tsl/robin_set.h>
+#include <algorithm>
#include <cassert>
+#include <cstdint>
#include <fstream>
#include <iostream>
#include <queue>
@@ -755,8 +757,13 @@ std::string WorkflowAssetList::RetrieveNameFromFile(const fs::path& file) const
std::ifstream ifs(file);
if (!ifs) return "";
+ uint64_t len;
+ ifs >> len;
+
std::string name;
- ifs >> name;
+ name.reserve(len);
+ std::copy_n(std::istreambuf_iterator(ifs), len, std::back_inserter(name));
+
return name;
}
@@ -777,6 +784,7 @@ void WorkflowAssetList::SaveEmptyInstance(const SavedAsset& asset) const
std::ofstream ofs(path);
if (!ofs) return;
+ ofs << (uint64_t)asset.Name.size();
ofs << asset.Name;
}