add .clang-format
Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index da9b387..e269b3d 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "dbuspassive.hpp"
+
+#include "dbus/util.hpp"
+
#include <chrono>
#include <cmath>
#include <memory>
@@ -20,12 +24,9 @@
#include <sdbusplus/bus.hpp>
#include <string>
-#include "dbuspassive.hpp"
-#include "dbus/util.hpp"
-
std::unique_ptr<ReadInterface> DbusPassive::CreateDbusPassive(
- sdbusplus::bus::bus& bus, const std::string& type,
- const std::string& id, DbusHelperInterface *helper)
+ sdbusplus::bus::bus& bus, const std::string& type, const std::string& id,
+ DbusHelperInterface* helper)
{
if (helper == nullptr)
{
@@ -39,16 +40,11 @@
return std::make_unique<DbusPassive>(bus, type, id, helper);
}
-DbusPassive::DbusPassive(
- sdbusplus::bus::bus& bus,
- const std::string& type,
- const std::string& id,
- DbusHelperInterface *helper)
- : ReadInterface(),
- _bus(bus),
- _signal(bus, GetMatch(type, id).c_str(), DbusHandleSignal, this),
- _id(id),
- _helper(helper)
+DbusPassive::DbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
+ const std::string& id, DbusHelperInterface* helper) :
+ ReadInterface(),
+ _bus(bus), _signal(bus, GetMatch(type, id).c_str(), DbusHandleSignal, this),
+ _id(id), _helper(helper)
{
/* Need to get the scale and initial value */
auto tempBus = sdbusplus::bus::new_default();
@@ -68,10 +64,7 @@
{
std::lock_guard<std::mutex> guard(_lock);
- struct ReadReturn r = {
- _value,
- _updated
- };
+ struct ReadReturn r = {_value, _updated};
return r;
}