From 22eee6cb986795b991ac214c38f35097ffdf1812 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Fri, 29 Oct 2010 00:26:46 +0300 Subject: [PATCH 1/1] formatting fixes --- src/W1Device.cc | 6 ++++-- src/W1Scanner.cc | 10 +++++----- src/W1TemperatureSensor.cc | 14 +++++++------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/W1Device.cc b/src/W1Device.cc index 3160c81..7f52c43 100644 --- a/src/W1Device.cc +++ b/src/W1Device.cc @@ -14,7 +14,9 @@ using namespace w1; using namespace std; -W1Device::W1Device(dirent *direntry, int family_code_param, string id_param) { +W1Device::W1Device(dirent *direntry, + int family_code_param, + string id_param) { string rootdir; string device_dir; string temp_str; @@ -24,7 +26,7 @@ W1Device::W1Device(dirent *direntry, int family_code_param, string id_param) { dir_path = rootdir + "/" + direntry->d_name; slave_file = dir_path + "/" + temp_str; family_code = family_code_param; - id = id_param; + id = id_param; name = id_param; } diff --git a/src/W1Scanner.cc b/src/W1Scanner.cc index 08f96cc..6a55eeb 100644 --- a/src/W1Scanner.cc +++ b/src/W1Scanner.cc @@ -78,13 +78,13 @@ W1Device *W1Scanner::create_device(dirent *direntry) { } list W1Scanner::get_device_list() { - DIR *dir; - int err_flg; + DIR *dir; + int err_flg; struct dirent *direntry; - W1Device *device; - list ret_val; + W1Device *device; + list ret_val; - dir = opendir(W1_SCAN_ROOTDIR); + dir = opendir(W1_SCAN_ROOTDIR); if (dir != NULL) { direntry = readdir(dir); while(direntry != NULL) { diff --git a/src/W1TemperatureSensor.cc b/src/W1TemperatureSensor.cc index 20dc3f3..39977e5 100644 --- a/src/W1TemperatureSensor.cc +++ b/src/W1TemperatureSensor.cc @@ -75,13 +75,13 @@ bool W1TemperatureSensor::is_supported_family_code(int family_code) { string W1TemperatureSensor::get_value() { vector text_file; - string temp; - string ret_val; - string last_line; - int pos; - int length; - string formatted_data; - int int_value; + string temp; + string ret_val; + string last_line; + int pos; + int length; + string formatted_data; + int int_value; ret_val = ""; ifstream ifs(slave_file.c_str()); -- 2.41.1