From 1a3e3fbc152072547236edbc355be6aba989dc15 Mon Sep 17 00:00:00 2001 From: ChunelFeng Date: Sun, 25 Aug 2024 22:54:56 +0800 Subject: [PATCH] [bugfix] Fix bazel compile error. --- .../GDynamicEngine/GDynamicEngine.cpp | 24 +++++++------------ src/UtilsCtrl/Container/USerialUniqueArray.h | 2 +- src/UtilsCtrl/Container/USmallVector.h | 6 ++--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp index a8595595..f83f23ee 100644 --- a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp +++ b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp @@ -28,22 +28,16 @@ CStatus GDynamicEngine::run() { CGRAPH_FUNCTION_BEGIN cur_status_.reset(); - switch (dag_type_) { - case internal::GEngineDagType::COMMON: { - commonRunAll(); - break; - } - case internal::GEngineDagType::ALL_SERIAL: { - serialRunAll(); - break; - } - case internal::GEngineDagType::ALL_PARALLEL: { - parallelRunAll(); - break; - } - default: - CGRAPH_RETURN_ERROR_STATUS("unknown engine dag type") + if (internal::GEngineDagType::COMMON == dag_type_) { + commonRunAll(); + } else if (internal::GEngineDagType::ALL_SERIAL == dag_type_) { + serialRunAll(); + } else if (internal::GEngineDagType::ALL_PARALLEL == dag_type_) { + parallelRunAll(); + } else { + CGRAPH_RETURN_ERROR_STATUS("unknown engine dag type") } + status = cur_status_; CGRAPH_FUNCTION_END } diff --git a/src/UtilsCtrl/Container/USerialUniqueArray.h b/src/UtilsCtrl/Container/USerialUniqueArray.h index a76f5392..5193b9b6 100644 --- a/src/UtilsCtrl/Container/USerialUniqueArray.h +++ b/src/UtilsCtrl/Container/USerialUniqueArray.h @@ -12,7 +12,7 @@ #include #include -#include "UtilsCtrl/UtilsObject.h" +#include "../UtilsObject.h" CGRAPH_NAMESPACE_BEGIN diff --git a/src/UtilsCtrl/Container/USmallVector.h b/src/UtilsCtrl/Container/USmallVector.h index 1ddf99aa..81306556 100644 --- a/src/UtilsCtrl/Container/USmallVector.h +++ b/src/UtilsCtrl/Container/USmallVector.h @@ -13,7 +13,7 @@ #include #include -#include "UtilsCtrl/UtilsObject.h" +#include "../UtilsObject.h" CGRAPH_NAMESPACE_BEGIN @@ -120,8 +120,8 @@ class USmallVector : public UtilsObject { public: UIter begin() const { return UIter(data_); } UIter end() const { return UIter(data_ + cur_index_); } - T front() const { data_[0]; } - T back() const { data_[cur_index_ - 1]; } + T front() const { return data_[0]; } + T back() const { return data_[cur_index_ - 1]; } private: T* data_ { nullptr }; // 存放具体数据