Commit f2afcb8b567c580281858a1a09e029808f268d6f

Authored by Jordi Inglada
1 parent e4abe646
Exists in master

Indent and trailing spaces

Showing 1 changed file with 8 additions and 8 deletions   Show diff stats
include/cbutils.h
... ... @@ -39,11 +39,11 @@ namespace cbutils
39 39 namespace string
40 40 {
41 41 // Splits a string using any of a list of separators
42   -[[nodiscard]] std::vector<std::string> split(const std::string& str,
  42 +[[nodiscard]] std::vector<std::string> split(const std::string& str,
43 43 const char* separators = "\t ")
44   -{
  44 +{
45 45 std::vector< std::string > tokens;
46   - boost::split(tokens, str, boost::is_any_of(separators),
  46 + boost::split(tokens, str, boost::is_any_of(separators),
47 47 boost::token_compress_on);
48 48 return tokens;
49 49 }
... ... @@ -103,7 +103,7 @@ namespace file
103 103 return lines;
104 104 }
105 105 //Count the number of columns of a CSV file
106   -[[nodiscard]] std::size_t count_columns(const std::string& fname,
  106 +[[nodiscard]] std::size_t count_columns(const std::string& fname,
107 107 const char* separators = "\t ")
108 108 {
109 109 std::ifstream ifile(fname);
... ... @@ -124,7 +124,7 @@ namespace file
124 124 #ifdef USE_FILESYSEM
125 125 // List the files in a directory eventually matching a pattern
126 126 // needs to link with -lboost_system -lboost_filesystem
127   -[[nodiscard]] std::vector<std::string> list_files(const std::string& dir,
  127 +[[nodiscard]] std::vector<std::string> list_files(const std::string& dir,
128 128 const std::string& pattern = ".*")
129 129 {
130 130 std::regex regex_pattern(pattern);
... ... @@ -149,7 +149,7 @@ namespace file
149 149 namespace seq
150 150 {
151 151 //Chops off the head of a sequence and returns its tail
152   -template <typename Seq>
  152 +template <typename Seq>
153 153 [[nodiscard]] Seq tail(const Seq& s)
154 154 {
155 155 Seq result{};
... ... @@ -159,7 +159,7 @@ template &lt;typename Seq&gt;
159 159 return result;
160 160 }
161 161 //Returns the last element of a sequence
162   -template <typename Seq>
  162 +template <typename Seq>
163 163 [[nodiscard]] auto last(const Seq& s)
164 164 {
165 165 auto element = s.cend();
... ... @@ -210,7 +210,7 @@ namespace misc
210 210 {
211 211 [[nodiscard]] std::string now_str()
212 212 {
213   - auto now_t =
  213 + auto now_t =
214 214 std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
215 215 std::stringstream result;
216 216 result << std::put_time(std::localtime(&now_t), "%F %T") << " -- ";
... ...