libcamera: process: start(): Use span instead of vector
Use a span instead of a const reference to a vector, this does not change the behaviour and allows e.g. arrays to be used to hold arguments/file descriptors. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/base/class.h>
|
||||
#include <libcamera/base/signal.h>
|
||||
#include <libcamera/base/span.h>
|
||||
#include <libcamera/base/unique_fd.h>
|
||||
|
||||
namespace libcamera {
|
||||
@@ -32,8 +32,8 @@ public:
|
||||
~Process();
|
||||
|
||||
int start(const std::string &path,
|
||||
const std::vector<std::string> &args = std::vector<std::string>(),
|
||||
const std::vector<int> &fds = std::vector<int>());
|
||||
Span<const std::string> args = {},
|
||||
Span<const int> fds = {});
|
||||
|
||||
ExitStatus exitStatus() const { return exitStatus_; }
|
||||
int exitCode() const { return exitCode_; }
|
||||
|
||||
Reference in New Issue
Block a user