summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/metadata.hpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-07-27 09:55:17 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-27 18:12:12 +0300
commit177df04d2b7f357ebe41f1a9809ab68b6f948082 (patch)
tree062bc7f480d96629461487c63b4762936a7dcb22 /src/ipa/raspberrypi/controller/metadata.hpp
parentb4a3eb6b98ce65a6c9323368fa0afcb887739628 (diff)
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 <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/metadata.hpp')
-rw-r--r--src/ipa/raspberrypi/controller/metadata.hpp16
1 files changed, 8 insertions, 8 deletions
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<typename T>
- 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<typename T>
- 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<typename T>
- 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<typename T>
- 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;