mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 00:55:07 +03:00
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>
This commit is contained in:
parent
b4a3eb6b98
commit
177df04d2b
63 changed files with 2093 additions and 2161 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue