Skip to content

Commit 659153c

Browse files
committed
workaround: trying to please appleclang who tries to instantiate a copy constructor on a type which has references as parameters for no reason
1 parent 2a15121 commit 659153c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

libmamba/src/core/output.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,16 @@ namespace mamba
291291
{
292292
}
293293

294-
const Context& m_context;
294+
ConsoleData(const ConsoleData&) = delete;
295+
ConsoleData& operator=(const ConsoleData&) = delete;
296+
297+
ConsoleData(ConsoleData&&) noexcept = delete;
298+
ConsoleData& operator=(ConsoleData&&) noexcept = delete;
295299

300+
const Context& m_context;
296301

297302
std::string json_hier;
298-
unsigned int json_index;
303+
unsigned int json_index = 0;
299304
nlohmann::json json_log;
300305
bool is_json_print_cancelled = false;
301306

@@ -306,7 +311,7 @@ namespace mamba
306311
};
307312

308313
Console::Console(const Context& context)
309-
: p_data(new ConsoleData{ context })
314+
: p_data(std::make_unique<ConsoleData>(context))
310315
{
311316
set_singleton(*this);
312317

0 commit comments

Comments
 (0)