libcamera: Remove space between empty curly brackets
Remove spaces between empty curly brackets (replacing { } with {}) to comply with the coding style. Fix one other coding style violation on the lines touched by those fixes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
d312d0ba10
commit
918bfb3c3d
5 changed files with 14 additions and 12 deletions
|
@ -27,9 +27,11 @@ public:
|
||||||
protected:
|
protected:
|
||||||
friend class MediaDevice;
|
friend class MediaDevice;
|
||||||
|
|
||||||
MediaObject(MediaDevice *dev, unsigned int id) :
|
MediaObject(MediaDevice *dev, unsigned int id)
|
||||||
dev_(dev), id_(id) { }
|
: dev_(dev), id_(id)
|
||||||
virtual ~MediaObject() { }
|
{
|
||||||
|
}
|
||||||
|
virtual ~MediaObject() {}
|
||||||
|
|
||||||
MediaDevice *dev_;
|
MediaDevice *dev_;
|
||||||
unsigned int id_;
|
unsigned int id_;
|
||||||
|
@ -49,7 +51,7 @@ private:
|
||||||
MediaLink(const struct media_v2_link *link,
|
MediaLink(const struct media_v2_link *link,
|
||||||
MediaPad *source, MediaPad *sink);
|
MediaPad *source, MediaPad *sink);
|
||||||
MediaLink(const MediaLink &) = delete;
|
MediaLink(const MediaLink &) = delete;
|
||||||
~MediaLink() { }
|
~MediaLink() {}
|
||||||
|
|
||||||
MediaPad *source_;
|
MediaPad *source_;
|
||||||
MediaPad *sink_;
|
MediaPad *sink_;
|
||||||
|
|
|
@ -199,7 +199,7 @@ void MediaDevice::unlock()
|
||||||
*/
|
*/
|
||||||
int MediaDevice::populate()
|
int MediaDevice::populate()
|
||||||
{
|
{
|
||||||
struct media_v2_topology topology = { };
|
struct media_v2_topology topology = {};
|
||||||
struct media_v2_entity *ents = nullptr;
|
struct media_v2_entity *ents = nullptr;
|
||||||
struct media_v2_interface *interfaces = nullptr;
|
struct media_v2_interface *interfaces = nullptr;
|
||||||
struct media_v2_link *links = nullptr;
|
struct media_v2_link *links = nullptr;
|
||||||
|
@ -767,7 +767,7 @@ void MediaDevice::fixupEntityFlags(struct media_v2_entity *entity)
|
||||||
*/
|
*/
|
||||||
int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)
|
int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)
|
||||||
{
|
{
|
||||||
struct media_link_desc linkDesc = { };
|
struct media_link_desc linkDesc = {};
|
||||||
MediaPad *source = link->source();
|
MediaPad *source = link->source();
|
||||||
MediaPad *sink = link->sink();
|
MediaPad *sink = link->sink();
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ Message::~Message()
|
||||||
* class MyCustomMessage : public Message
|
* class MyCustomMessage : public Message
|
||||||
* {
|
* {
|
||||||
* public:
|
* public:
|
||||||
* MyCustomMessage() : Message(type()) { }
|
* MyCustomMessage() : Message(type()) {}
|
||||||
*
|
*
|
||||||
* static Message::Type type()
|
* static Message::Type type()
|
||||||
* {
|
* {
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual int init() { return 0; }
|
virtual int init() { return 0; }
|
||||||
virtual int run() = 0;
|
virtual int run() = 0;
|
||||||
virtual void cleanup() { }
|
virtual void cleanup() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TEST_REGISTER(klass) \
|
#define TEST_REGISTER(klass) \
|
||||||
|
|
|
@ -26,13 +26,13 @@ using namespace std;
|
||||||
class MediaDevicePrintTest : public Test
|
class MediaDevicePrintTest : public Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MediaDevicePrintTest() { }
|
MediaDevicePrintTest() {}
|
||||||
~MediaDevicePrintTest() { }
|
~MediaDevicePrintTest() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int init() { return 0; }
|
int init() { return 0; }
|
||||||
int run();
|
int run();
|
||||||
void cleanup() { }
|
void cleanup() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int testMediaDevice(string deviceNode);
|
int testMediaDevice(string deviceNode);
|
||||||
|
@ -137,7 +137,7 @@ int MediaDevicePrintTest::run()
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < MAX_MEDIA_DEV; i++) {
|
for (i = 0; i < MAX_MEDIA_DEV; i++) {
|
||||||
string mediadev = deviceNode + to_string(i);
|
string mediadev = deviceNode + to_string(i);
|
||||||
struct stat pstat = { };
|
struct stat pstat = {};
|
||||||
|
|
||||||
if (stat(mediadev.c_str(), &pstat))
|
if (stat(mediadev.c_str(), &pstat))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue