diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/Model/Assets.hpp | 3 | ||||
-rw-r--r-- | core/src/Model/Template/Template_Main.cpp | 2 | ||||
-rw-r--r-- | core/src/Model/Workflow/Workflow.hpp | 7 | ||||
-rw-r--r-- | core/src/Model/Workflow/Workflow_Main.cpp | 14 | ||||
-rw-r--r-- | core/src/Utils/UUID.hpp | 5 |
5 files changed, 18 insertions, 13 deletions
diff --git a/core/src/Model/Assets.hpp b/core/src/Model/Assets.hpp index 3401e42..feb4432 100644 --- a/core/src/Model/Assets.hpp +++ b/core/src/Model/Assets.hpp @@ -1,7 +1,8 @@ #pragma once +#include "Utils/UUID.hpp" + #include <tsl/array_map.h> -#include <uuid.h> #include <filesystem> #include <iosfwd> #include <memory> diff --git a/core/src/Model/Template/Template_Main.cpp b/core/src/Model/Template/Template_Main.cpp index 92ad050..9bebc21 100644 --- a/core/src/Model/Template/Template_Main.cpp +++ b/core/src/Model/Template/Template_Main.cpp @@ -2,9 +2,9 @@ #include "Model/GlobalStates.hpp" #include "Model/Project.hpp" +#include "Utils/UUID.hpp" #include <imgui.h> -#include <uuid.h> #include <fstream> using namespace std::literals::string_view_literals; diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp index 8b3db8a..e5e434a 100644 --- a/core/src/Model/Workflow/Workflow.hpp +++ b/core/src/Model/Workflow/Workflow.hpp @@ -6,14 +6,13 @@ #include "cplt_fwd.hpp" #include <imgui_node_editor.h> -#include <any> #include <cstddef> #include <cstdint> #include <filesystem> +#include <functional> #include <iosfwd> #include <limits> #include <memory> -#include <span> #include <string> #include <variant> #include <vector> @@ -272,8 +271,8 @@ public: void WriteTo(std::ostream& stream); private: - std::pair<WorkflowConnection&, size_t> AllocWorkflowConnection(); - std::pair<std::unique_ptr<WorkflowNode>&, size_t> AllocWorkflowStep(); + std::pair<WorkflowConnection&, uint32_t> AllocWorkflowConnection(); + std::pair<std::unique_ptr<WorkflowNode>&, uint32_t> AllocWorkflowStep(); }; class WorkflowAssetList final : public AssetListTyped<Workflow> diff --git a/core/src/Model/Workflow/Workflow_Main.cpp b/core/src/Model/Workflow/Workflow_Main.cpp index 202818f..131e0ae 100644 --- a/core/src/Model/Workflow/Workflow_Main.cpp +++ b/core/src/Model/Workflow/Workflow_Main.cpp @@ -2,11 +2,11 @@ #include "Model/GlobalStates.hpp" #include "Model/Project.hpp" +#include "Utils/UUID.hpp" #include <imgui.h> #include <imgui_node_editor.h> #include <tsl/robin_set.h> -#include <uuid.h> #include <cassert> #include <fstream> #include <iostream> @@ -710,32 +710,32 @@ void Workflow::WriteTo(std::ostream& stream) } } -std::pair<WorkflowConnection&, size_t> Workflow::AllocWorkflowConnection() +std::pair<WorkflowConnection&, uint32_t> Workflow::AllocWorkflowConnection() { for (size_t idx = 0; idx < mConnections.size(); ++idx) { auto& elm = mConnections[idx]; if (!elm.IsValid()) { - return { elm, idx }; + return { elm, (uint32_t)idx }; } } - auto id = mConnections.size(); + auto id = (uint32_t)mConnections.size(); auto& conn = mConnections.emplace_back(WorkflowConnection{}); conn.Id = id; return { conn, id }; } -std::pair<std::unique_ptr<WorkflowNode>&, size_t> Workflow::AllocWorkflowStep() +std::pair<std::unique_ptr<WorkflowNode>&, uint32_t> Workflow::AllocWorkflowStep() { for (size_t idx = 0; idx < mNodes.size(); ++idx) { auto& elm = mNodes[idx]; if (elm == nullptr) { - return { elm, idx }; + return { elm, (uint32_t)idx }; } } - auto id = mNodes.size(); + auto id = (uint32_t)mNodes.size(); auto& node = mNodes.emplace_back(std::unique_ptr<WorkflowNode>()); return { node, id }; diff --git a/core/src/Utils/UUID.hpp b/core/src/Utils/UUID.hpp new file mode 100644 index 0000000..9044aa6 --- /dev/null +++ b/core/src/Utils/UUID.hpp @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include <uuid.h> |