Skip to content

Commit

Permalink
[bugfix] fix GMutable isSerializable
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunelFeng committed Mar 2, 2024
1 parent 6c16ef8 commit 100931d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CStatus GMutable::addElement(GElementPtr element) {

CStatus GMutable::init() {
CGRAPH_FUNCTION_BEGIN
CGRAPH_ASSERT_NOT_NULL(manager_)
manager_->setThreadPool(thread_pool_);
status = manager_->initEngine();
CGRAPH_FUNCTION_CHECK_STATUS
Expand All @@ -43,7 +44,6 @@ CStatus GMutable::init() {

CStatus GMutable::run() {
CGRAPH_FUNCTION_BEGIN
CGRAPH_ASSERT_NOT_NULL(manager_)

/**
* 1. 初始化内容
Expand Down Expand Up @@ -71,6 +71,12 @@ CStatus GMutable::destroy() {
}


CBool GMutable::isSerializable() const {
// 情况随时可能发生变化,直接设定不可以 serialize 即可
return false;
}


CVoid GMutable::setup() {
for (auto* element : group_elements_arr_) {
element->run_before_.clear();
Expand Down
2 changes: 2 additions & 0 deletions src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class GMutable : public GGroup {

CStatus destroy() final;

CBool isSerializable() const override;

/**
* 将数据进行恢复
* @return
Expand Down

0 comments on commit 100931d

Please sign in to comment.