diff options
author | saturneric <[email protected]> | 2025-02-03 18:01:26 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-03 18:01:26 +0000 |
commit | d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600 (patch) | |
tree | 5cc7838f1325b076b91bb898fd0da3cfcb60b455 /src/core/function/basic | |
parent | doc: update README.md (diff) | |
parent | fix: set pb range when size of operas > 1 (diff) | |
download | GpgFrontend-d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600.tar.gz GpgFrontend-d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600.zip |
Merge branch 'develop'
Diffstat (limited to 'src/core/function/basic')
-rw-r--r-- | src/core/function/basic/GpgFunctionObject.h | 6 | ||||
-rw-r--r-- | src/core/function/basic/SingletonStorage.cpp | 9 | ||||
-rw-r--r-- | src/core/function/basic/SingletonStorage.h | 7 |
3 files changed, 12 insertions, 10 deletions
diff --git a/src/core/function/basic/GpgFunctionObject.h b/src/core/function/basic/GpgFunctionObject.h index 06ad6bfd..41a597e5 100644 --- a/src/core/function/basic/GpgFunctionObject.h +++ b/src/core/function/basic/GpgFunctionObject.h @@ -141,11 +141,11 @@ class SingletonFunctionObject : public ChannelObject { } /** - * @brief Get all the channel ids + * @brief Get the All Channel Id object * - * @return std::vector<int> + * @return QContainer<int> */ - static auto GetAllChannelId() -> std::vector<int> { + static auto GetAllChannelId() -> QContainer<int> { return SingletonStorageCollection::GetInstance(false) ->GetSingletonStorage(typeid(T)) ->GetAllChannelId(); diff --git a/src/core/function/basic/SingletonStorage.cpp b/src/core/function/basic/SingletonStorage.cpp index e51acd77..be26d0f5 100644 --- a/src/core/function/basic/SingletonStorage.cpp +++ b/src/core/function/basic/SingletonStorage.cpp @@ -31,7 +31,8 @@ #include <shared_mutex> #include "core/function/basic/ChannelObject.h" -#include "utils/MemoryUtils.h" +#include "core/typedef/CoreTypedef.h" +#include "core/utils/MemoryUtils.h" namespace GpgFrontend { @@ -60,8 +61,8 @@ class SingletonStorage::Impl { } } - auto GetAllChannelId() -> std::vector<int> { - std::vector<int> channels; + auto GetAllChannelId() -> QContainer<int> { + QContainer<int> channels; channels.reserve(instances_map_.size()); for (const auto& [key, value] : instances_map_) { channels.push_back(key); @@ -119,7 +120,7 @@ auto SingletonStorage::FindObjectInChannel(int channel) return p_->FindObjectInChannel(channel); } -auto SingletonStorage::GetAllChannelId() -> std::vector<int> { +auto SingletonStorage::GetAllChannelId() -> QContainer<int> { return p_->GetAllChannelId(); } diff --git a/src/core/function/basic/SingletonStorage.h b/src/core/function/basic/SingletonStorage.h index 81ae570f..574a16ec 100644 --- a/src/core/function/basic/SingletonStorage.h +++ b/src/core/function/basic/SingletonStorage.h @@ -29,6 +29,7 @@ #pragma once #include "core/function/SecureMemoryAllocator.h" +#include "core/typedef/GpgTypedef.h" namespace GpgFrontend { @@ -66,11 +67,11 @@ class GPGFRONTEND_CORE_EXPORT SingletonStorage { auto FindObjectInChannel(int channel) -> ChannelObject*; /** - * @brief Get all the channel ids + * @brief Get the All Channel Id object * - * @return std::vector<int> + * @return QContainer<int> */ - auto GetAllChannelId() -> std::vector<int>; + auto GetAllChannelId() -> QContainer<int>; /** * @brief Set a new object in channel object |