diff --git a/src/common/api/internal_types.hpp b/src/common/api/internal_types.hpp index 0140a62f437a6c6375fd8d1bda43ec41222fc976..7afede19215a39f143045be76bf9ecbe8cc33952 100644 --- a/src/common/api/internal_types.hpp +++ b/src/common/api/internal_types.hpp @@ -73,6 +73,11 @@ struct adhoc_storage_info { return m_adhoc_storage; } + void + update(admire::adhoc_storage::ctx adhoc_context) { + m_adhoc_storage.update(std::move(adhoc_context)); + } + admire::error_code add_client_info(std::shared_ptr job_info) { diff --git a/src/scord/adhoc_storage_manager.hpp b/src/scord/adhoc_storage_manager.hpp index 78b22ba976ef6f2b7e3dbbe986fc9f2d1bd50d34..160692ffae60c4ab802132ce80b9992f646c5587 100644 --- a/src/scord/adhoc_storage_manager.hpp +++ b/src/scord/adhoc_storage_manager.hpp @@ -75,12 +75,8 @@ struct adhoc_storage_manager : scord::utils::singleton { if(const auto it = m_adhoc_storages.find(id); it != m_adhoc_storages.end()) { - const auto current_adhoc_info = it->second; - auto tmp_adhoc = current_adhoc_info->adhoc_storage(); - tmp_adhoc.update(std::move(new_ctx)); - - *it->second = admire::internal::adhoc_storage_info{tmp_adhoc}; + current_adhoc_info->update(std::move(new_ctx)); return ADM_SUCCESS; }