summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/metadata.hpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-07-27 09:55:18 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-27 18:12:13 +0300
commitacd5d9979fca93bf7a0ffa6f5d08f5cf43ba0cee (patch)
treeb2fb78d222edac459107da0d54991e7a7f5b4dbb /src/ipa/raspberrypi/controller/metadata.hpp
parent177df04d2b7f357ebe41f1a9809ab68b6f948082 (diff)
ipa: raspberrypi: Change to C style code comments
As part of the on-going refactor efforts for the source files in src/ipa/raspberrypi/, switch all C++ style comments to C style comments. 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.hpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp
index a79a67d4..9f73e61e 100644
--- a/src/ipa/raspberrypi/controller/metadata.hpp
+++ b/src/ipa/raspberrypi/controller/metadata.hpp
@@ -6,7 +6,7 @@
*/
#pragma once
-// A simple class for carrying arbitrary metadata, for example about an image.
+/* A simple class for carrying arbitrary metadata, for example about an image. */
#include <any>
#include <map>
@@ -81,8 +81,10 @@ public:
template<typename T>
T *getLocked(std::string const &tag)
{
- // This allows in-place access to the Metadata contents,
- // for which you should be holding the lock.
+ /*
+ * This allows in-place access to the Metadata contents,
+ * for which you should be holding the lock.
+ */
auto it = data_.find(tag);
if (it == data_.end())
return nullptr;
@@ -92,13 +94,15 @@ public:
template<typename T>
void setLocked(std::string const &tag, T const &value)
{
- // Use this only if you're holding the lock yourself.
+ /* Use this only if you're holding the lock yourself. */
data_[tag] = value;
}
- // Note: use of (lowercase) lock and unlock means you can create scoped
- // locks with the standard lock classes.
- // e.g. std::lock_guard<RPiController::Metadata> lock(metadata)
+ /*
+ * Note: use of (lowercase) lock and unlock means you can create scoped
+ * locks with the standard lock classes.
+ * e.g. std::lock_guard<RPiController::Metadata> lock(metadata)
+ */
void lock() { mutex_.lock(); }
void unlock() { mutex_.unlock(); }
@@ -107,4 +111,4 @@ private:
std::map<std::string, std::any> data_;
};
-} // namespace RPiController
+} /* namespace RPiController */