[RFC,v1,2/3] libcamera: device_enumerator_udev: Disable copy/move
diff mbox series

Message ID 20251202135817.1607250-2-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [RFC,v1,1/3] libcamera: device_enumerator_udev: Add `override`
Related show

Commit Message

Barnabás Pőcze Dec. 2, 2025, 1:58 p.m. UTC
The the default implementations generated by the compiler are not appropriate.
So disable them.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 include/libcamera/internal/device_enumerator_udev.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Kieran Bingham Dec. 2, 2025, 2:03 p.m. UTC | #1
Quoting Barnabás Pőcze (2025-12-02 13:58:16)
> The the default implementations generated by the compiler are not appropriate.

/The the/The/


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> So disable them.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
>  include/libcamera/internal/device_enumerator_udev.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h
> index fb0005921a..c2f7154b6b 100644
> --- a/include/libcamera/internal/device_enumerator_udev.h
> +++ b/include/libcamera/internal/device_enumerator_udev.h
> @@ -14,6 +14,8 @@
>  #include <string>
>  #include <sys/types.h>
>  
> +#include <libcamera/base/class.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
>  
>  struct udev;
> @@ -54,6 +56,8 @@ private:
>                 DependencyMap deps_;
>         };
>  
> +       LIBCAMERA_DISABLE_COPY_AND_MOVE(DeviceEnumeratorUdev)
> +
>         int addUdevDevice(struct udev_device *dev);
>         int populateMediaDevice(MediaDevice *media, DependencyMap *deps);
>         std::string lookupDeviceNode(dev_t devnum);
> -- 
> 2.52.0
>

Patch
diff mbox series

diff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h
index fb0005921a..c2f7154b6b 100644
--- a/include/libcamera/internal/device_enumerator_udev.h
+++ b/include/libcamera/internal/device_enumerator_udev.h
@@ -14,6 +14,8 @@ 
 #include <string>
 #include <sys/types.h>
 
+#include <libcamera/base/class.h>
+
 #include "libcamera/internal/device_enumerator.h"
 
 struct udev;
@@ -54,6 +56,8 @@  private:
 		DependencyMap deps_;
 	};
 
+	LIBCAMERA_DISABLE_COPY_AND_MOVE(DeviceEnumeratorUdev)
+
 	int addUdevDevice(struct udev_device *dev);
 	int populateMediaDevice(MediaDevice *media, DependencyMap *deps);
 	std::string lookupDeviceNode(dev_t devnum);