@@ -140,9 +140,7 @@ std::vector<print_entry> get_entries_to_print(git_status_t status, status_list_w
140
140
return entries_to_print;
141
141
}
142
142
143
- using str_colour_fn = std::ostream& (*)(std::ostream&);
144
-
145
- void print_entries (std::vector<print_entry> entries_to_print, bool is_long, str_colour_fn colour)
143
+ void print_entries (std::vector<print_entry> entries_to_print, bool is_long, stream_colour_fn colour)
146
144
{
147
145
for (auto e: entries_to_print)
148
146
{
@@ -158,7 +156,7 @@ void print_entries(std::vector<print_entry> entries_to_print, bool is_long, str_
158
156
}
159
157
160
158
void print_not_tracked (const std::vector<print_entry>& entries_to_print, const std::set<std::string>& tracked_dir_set,
161
- std::set<std::string>& untracked_dir_set, bool is_long, str_colour_fn colour)
159
+ std::set<std::string>& untracked_dir_set, bool is_long, stream_colour_fn colour)
162
160
{
163
161
std::vector<print_entry> not_tracked_entries_to_print{};
164
162
for (auto e: entries_to_print)
@@ -233,7 +231,7 @@ void status_subcommand::run()
233
231
234
232
if (sl.has_tobecommited_header ())
235
233
{
236
- str_colour_fn colour = termcolor::green;
234
+ stream_colour_fn colour = termcolor::green;
237
235
if (is_long)
238
236
{
239
237
std::cout << tobecommited_header;
@@ -251,7 +249,7 @@ void status_subcommand::run()
251
249
252
250
if (sl.has_notstagged_header ())
253
251
{
254
- str_colour_fn colour = termcolor::red;
252
+ stream_colour_fn colour = termcolor::red;
255
253
if (is_long)
256
254
{
257
255
std::cout << notstagged_header;
@@ -268,7 +266,7 @@ void status_subcommand::run()
268
266
269
267
if (sl.has_untracked_header ())
270
268
{
271
- str_colour_fn colour = termcolor::red;
269
+ stream_colour_fn colour = termcolor::red;
272
270
if (is_long)
273
271
{
274
272
std::cout << untracked_header;
@@ -282,7 +280,7 @@ void status_subcommand::run()
282
280
283
281
// if (sl.has_ignored_header())
284
282
// {
285
- // str_colour_fn colour = termcolor::red;
283
+ // stream_colour_fn colour = termcolor::red;
286
284
// if (is_long)
287
285
// {
288
286
// std::cout << ignored_header;
0 commit comments