[PATCH] remove pointless constructor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The members can be initialized directly, allowing to remove the
onstructor.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
 utils/v4l2-compliance/v4l2-test-buffers.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index a005fde61..2f01ed8f3 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -2453,8 +2453,6 @@ int testRequests(struct node *node, bool test_streaming)
 class BlockingThread
 {
 public:
-	BlockingThread() : done(false), running(false) {}
-
 	virtual ~BlockingThread()
 	{
 		stop();
@@ -2497,7 +2495,7 @@ public:
 		running = false;
 	}
 
-	std::atomic<bool> done;
+	std::atomic<bool> done{};
 
 private:
 	static void *startRoutine(void *arg)
@@ -2516,7 +2514,7 @@ private:
 	virtual void run() = 0;
 
 	pthread_t thread;
-	std::atomic<bool> running;
+	std::atomic<bool> running{};
 };
 
 class DqbufThread : public BlockingThread
-- 
2.31.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux