@@ -273,6 +273,15 @@ namespace mamba
273
273
* Console *
274
274
***********/
275
275
276
+
277
+ using ConsoleBuffer = std::vector<std::string>;
278
+
279
+ struct ConsoleSynchedData
280
+ {
281
+ std::unique_ptr<ProgressBarManager> progress_bar_manager;
282
+ ConsoleBuffer buffer;
283
+ };
284
+
276
285
class ConsoleData
277
286
{
278
287
public:
@@ -290,15 +299,8 @@ namespace mamba
290
299
nlohmann::json json_log;
291
300
bool is_json_print_cancelled = false ;
292
301
293
- using Buffer = std::vector<std::string>;
294
-
295
- struct Data
296
- {
297
- std::unique_ptr<ProgressBarManager> progress_bar_manager;
298
- Buffer buffer;
299
- };
300
302
301
- util::synchronized_value<Data > m_synched_data;
303
+ util::synchronized_value<ConsoleSynchedData > m_synched_data;
302
304
303
305
TaskSynchronizer m_tasksync;
304
306
};
@@ -369,7 +371,7 @@ namespace mamba
369
371
void Console::print_buffer (std::ostream& ostream)
370
372
{
371
373
auto & data = instance ().p_data ;
372
- ConsoleData::Buffer tmp;
374
+ ConsoleBuffer tmp;
373
375
data->m_synched_data ->buffer .swap (tmp);
374
376
375
377
for (const auto & message : tmp)
@@ -442,8 +444,8 @@ namespace mamba
442
444
return p_data->m_synched_data ->progress_bar_manager ->add_progress_bar (
443
445
name,
444
446
{
445
- /* .graphics = */ context ().graphics_params ,
446
- /* .ascii_only = */ context ().ascii_only ,
447
+ .graphics = context ().graphics_params ,
448
+ .ascii_only = context ().ascii_only ,
447
449
},
448
450
expected_total
449
451
);
0 commit comments