diff options
author | rtk0c <[email protected]> | 2021-06-13 21:33:26 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-06-13 21:33:26 -0700 |
commit | 90796ccce3ef9087c1288d737738f65e188cff0b (patch) | |
tree | 6127c3833577af6cac3942736a0d357c96ea3786 /core/src/Model/Workflow | |
parent | bdee9dd0c92865e0cec2f4bbf170959df282a930 (diff) |
Add table UI and single cell properties
Diffstat (limited to 'core/src/Model/Workflow')
-rw-r--r-- | core/src/Model/Workflow/Workflow_Main.cpp | 10 |
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; } |