From 177df04d2b7f357ebe41f1a9809ab68b6f948082 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 27 Jul 2022 09:55:17 +0100 Subject: ipa: raspberrypi: Code refactoring to match style guidelines Refactor all the source files in src/ipa/raspberrypi/ to match the recommended formatting guidelines for the libcamera project. The vast majority of changes in this commit comprise of switching from snake_case to CamelCase, and starting class member functions with a lower case character. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/metadata.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ipa/raspberrypi/controller/metadata.hpp') diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp index 51e576cf..a79a67d4 100644 --- a/src/ipa/raspberrypi/controller/metadata.hpp +++ b/src/ipa/raspberrypi/controller/metadata.hpp @@ -22,26 +22,26 @@ public: Metadata(Metadata const &other) { - std::scoped_lock other_lock(other.mutex_); + std::scoped_lock otherLock(other.mutex_); data_ = other.data_; } Metadata(Metadata &&other) { - std::scoped_lock other_lock(other.mutex_); + std::scoped_lock otherLock(other.mutex_); data_ = std::move(other.data_); other.data_.clear(); } template - void Set(std::string const &tag, T const &value) + void set(std::string const &tag, T const &value) { std::scoped_lock lock(mutex_); data_[tag] = value; } template - int Get(std::string const &tag, T &value) const + int get(std::string const &tag, T &value) const { std::scoped_lock lock(mutex_); auto it = data_.find(tag); @@ -51,7 +51,7 @@ public: return 0; } - void Clear() + void clear() { std::scoped_lock lock(mutex_); data_.clear(); @@ -72,14 +72,14 @@ public: return *this; } - void Merge(Metadata &other) + void merge(Metadata &other) { std::scoped_lock lock(mutex_, other.mutex_); data_.merge(other.data_); } template - T *GetLocked(std::string const &tag) + T *getLocked(std::string const &tag) { // This allows in-place access to the Metadata contents, // for which you should be holding the lock. @@ -90,7 +90,7 @@ public: } template - void SetLocked(std::string const &tag, T const &value) + void setLocked(std::string const &tag, T const &value) { // Use this only if you're holding the lock yourself. data_[tag] = value; -- cgit v1.2.1