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:
@@ -5,9 +5,9 @@
|
||||
* Process test
|
||||
*/
|
||||
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/base/event_dispatcher.h>
|
||||
#include <libcamera/base/thread.h>
|
||||
@@ -48,8 +48,7 @@ protected:
|
||||
Timer timeout;
|
||||
|
||||
int exitCode = 42;
|
||||
vector<std::string> args;
|
||||
args.push_back(to_string(exitCode));
|
||||
std::array args{ to_string(exitCode) };
|
||||
proc_.finished.connect(this, &ProcessTest::procFinished);
|
||||
|
||||
/* Test that kill() on an unstarted process is safe. */
|
||||
|
||||
Reference in New Issue
Block a user