summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-19 14:19:34 -0800
committerPatrick Venture <venture@google.com>2019-01-02 11:56:09 -0800
commit4d9506ccfa41c3cce67e4cceb650bf81cd8022a7 (patch)
tree94a55664b36bfff1fd66fb9741edc8e7c0241d58
parent52b40613764d9beaa498664c783edbb87d99dcd3 (diff)
downloadphosphor-hwmon-4d9506ccfa41c3cce67e4cceb650bf81cd8022a7.tar.gz
phosphor-hwmon-4d9506ccfa41c3cce67e4cceb650bf81cd8022a7.zip
hwmonio: add underscore prefix to members
Add underscore prefix to members for hwmonio object. Change-Id: Iab5aed5ddba3b1793bb16b0f1501a11ff95b7f35 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--hwmonio.cpp8
-rw-r--r--hwmonio.hpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/hwmonio.cpp b/hwmonio.cpp
index 6c461b3..9142c18 100644
--- a/hwmonio.cpp
+++ b/hwmonio.cpp
@@ -71,7 +71,7 @@ static constexpr auto retryableErrors = {
EMSGSIZE,
};
-HwmonIO::HwmonIO(const std::string& path) : p(path)
+HwmonIO::HwmonIO(const std::string& path) : _p(path)
{
}
@@ -81,7 +81,7 @@ int64_t HwmonIO::read(const std::string& type, const std::string& id,
{
int64_t val;
std::ifstream ifs;
- auto fullPath = sysfs::make_sysfs_path(p, type, id, sensor);
+ auto fullPath = sysfs::make_sysfs_path(_p, type, id, sensor);
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit |
std::ifstream::eofbit);
@@ -149,7 +149,7 @@ void HwmonIO::write(uint32_t val, const std::string& type,
{
std::ofstream ofs;
- auto fullPath = sysfs::make_sysfs_path(p, type, id, sensor);
+ auto fullPath = sysfs::make_sysfs_path(_p, type, id, sensor);
ofs.exceptions(std::ofstream::failbit | std::ofstream::badbit |
std::ofstream::eofbit);
@@ -204,7 +204,7 @@ void HwmonIO::write(uint32_t val, const std::string& type,
std::string HwmonIO::path() const
{
- return p;
+ return _p;
}
} // namespace hwmonio
diff --git a/hwmonio.hpp b/hwmonio.hpp
index 902888f..f0c7248 100644
--- a/hwmonio.hpp
+++ b/hwmonio.hpp
@@ -107,7 +107,7 @@ class HwmonIO : public HwmonIOInterface
std::string path() const override;
private:
- std::string p;
+ std::string _p;
};
} // namespace hwmonio
OpenPOWER on IntegriCloud