From afa9e975060169168853700c06736ab519e996ee Mon Sep 17 00:00:00 2001 From: Arthur Guyader Date: Wed, 31 Jul 2019 14:46:38 +0200 Subject: Add some modifications (space, new line, coma, float). This commit adds some modifications for code readability and to remove compilation warnings in low can. Signed-off-by: Arthur Guyader Change-Id: Ia85f94125c1e9ff41cda60f027ab7213c8f378dc --- src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ac7ce4b..9f7969f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -151,7 +151,7 @@ std::ostream& operator<<(std::ostream& o, const generator& v) << v.line_prefix_ << "\t" << v.v_.bit_position() << ",// bit_position\n" << v.line_prefix_ << "\t" << v.v_.bit_size() << ",// bit_size\n" << v.line_prefix_ << "\t" << gen(v.v_.factor()) << ",// factor\n" - << v.line_prefix_ << "\t" << v.v_.offset() << ",// offset\n" + << v.line_prefix_ << "\t" << gen(v.v_.offset()) << ",// offset\n" << v.line_prefix_ << "\t" << "0,// min_value\n" << v.line_prefix_ << "\t" << "0,// max_value\n" << v.line_prefix_ << "\tfrequency_clock_t(" << gen(v.v_.max_frequency()) << "),// frequency\n" @@ -168,11 +168,11 @@ std::ostream& operator<<(std::ostream& o, const generator& v) }else{ multi_first = "false"; } - std::string multi = "std::make_pair(" + multi_first + "," + std::to_string(v.v_.multiplex().second) + ")"; + std::string multi = "std::make_pair(" + multi_first + ", " + std::to_string(v.v_.multiplex().second) + ")"; o << v.line_prefix_ << '\t' << multi << ",// multiplex\n" << v.line_prefix_ << '\t' << v.v_.is_big_endian() << ",// is_big_endian\n" << v.line_prefix_ << '\t' << v.v_.is_signed() << ",// is_signed\n" - << v.line_prefix_ << "\t" << gen(v.v_.unit()) << ",// unit\n" + << v.line_prefix_ << "\t" << gen(v.v_.unit()) << "// unit\n" << v.line_prefix_ << "})}"; return o; } @@ -200,7 +200,7 @@ std::ostream& operator<<(std::ostream& o, const generator& o << "frequency_clock_t(" << gen(v.v_.max_frequency()) << ")," << gen(v.v_.force_send_changed()) << ","; std::uint32_t index = 0; - o << "\t\t\t\t\t{ // beginning signals vector\n"; + o << "\n\t\t\t\t\t{ // beginning signals vector\n"; std::uint32_t signal_count = (uint32_t)v.v_.signals().size(); for(const openxc::signal& s : v.v_.signals()) { -- cgit 1.2.3-korg