diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/base/bound_method.h | 20 | ||||
-rw-r--r-- | include/libcamera/base/object.h | 3 | ||||
-rw-r--r-- | include/libcamera/camera_manager.h | 3 | ||||
-rw-r--r-- | include/libcamera/ipa/soft.mojom | 3 |
4 files changed, 13 insertions, 16 deletions
diff --git a/include/libcamera/base/bound_method.h b/include/libcamera/base/bound_method.h index dd3488ee..507c320d 100644 --- a/include/libcamera/base/bound_method.h +++ b/include/libcamera/base/bound_method.h @@ -98,21 +98,15 @@ public: using PackType = BoundMethodPack<R, Args...>; private: - template<std::size_t... I, typename T = R> - std::enable_if_t<!std::is_void<T>::value, void> - invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>) + template<std::size_t... I> + void invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>) { - PackType *args = static_cast<PackType *>(pack); - args->ret_ = invoke(std::get<I>(args->args_)...); - } + [[maybe_unused]] auto *args = static_cast<PackType *>(pack); - template<std::size_t... I, typename T = R> - std::enable_if_t<std::is_void<T>::value, void> - invokePack(BoundMethodPackBase *pack, std::index_sequence<I...>) - { - /* args is effectively unused when the sequence I is empty. */ - PackType *args [[gnu::unused]] = static_cast<PackType *>(pack); - invoke(std::get<I>(args->args_)...); + if constexpr (!std::is_void_v<R>) + args->ret_ = invoke(std::get<I>(args->args_)...); + else + invoke(std::get<I>(args->args_)...); } public: diff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h index 6cb935a0..a24f84ff 100644 --- a/include/libcamera/base/object.h +++ b/include/libcamera/base/object.h @@ -9,6 +9,7 @@ #include <list> #include <memory> +#include <utility> #include <vector> #include <libcamera/base/bound_method.h> @@ -39,7 +40,7 @@ public: { T *obj = static_cast<T *>(this); auto *method = new BoundMethodMember<T, R, FuncArgs...>(obj, this, func, type); - return method->activate(args..., true); + return method->activate(std::forward<Args>(args)..., true); } Thread *thread() const { return thread_; } diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h index b50df782..27835500 100644 --- a/include/libcamera/camera_manager.h +++ b/include/libcamera/camera_manager.h @@ -9,6 +9,7 @@ #include <memory> #include <string> +#include <string_view> #include <sys/types.h> #include <vector> @@ -31,7 +32,7 @@ public: void stop(); std::vector<std::shared_ptr<Camera>> cameras() const; - std::shared_ptr<Camera> get(const std::string &id); + std::shared_ptr<Camera> get(std::string_view id); static const std::string &version() { return version_; } diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom index a8e6ecda..77328c5f 100644 --- a/include/libcamera/ipa/soft.mojom +++ b/include/libcamera/ipa/soft.mojom @@ -16,7 +16,8 @@ interface IPASoftInterface { init(libcamera.IPASettings settings, libcamera.SharedFD fdStats, libcamera.SharedFD fdParams, - libcamera.ControlInfoMap sensorCtrlInfoMap) + libcamera.IPACameraSensorInfo sensorInfo, + libcamera.ControlInfoMap sensorControls) => (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled); start() => (int32 ret); stop(); |