Skip to content

Commit 4d12302

Browse files
committed
typos
1 parent 3b77632 commit 4d12302

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

experiments/tatonnement_sim_experiment.cc

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ TatonnementSimExperiment::run_current_trial(std::unique_ptr<OrderbookManager>& m
1414

1515
TatonnementManagementStructures tatonnement(*manager_ptr);
1616

17-
std::thread th = tatonnement.oracle.launch_timeout_thread(3000, timeout_flag, cancel_timeout_thread);
17+
auto th = tatonnement.oracle.launch_timeout_thread(3000, timeout_flag, cancel_timeout_thread);
1818

1919
auto res = tatonnement.oracle.compute_prices_grid_search(prices.data(), current_approx_params);
2020

2121
cancel_timeout_thread = true;
2222

23-
th.join();
23+
if (th)
24+
{
25+
th->join();
26+
}
2427

2528
auto lp_results = tatonnement.lp_solver.solve(prices.data(), current_approx_params, !timeout_flag);
2629

memory_database/memory_database.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ MemoryDatabase::MemoryDatabase()
3333
transfer_logs(std::nullopt)
3434
, hash_log(std::nullopt)
3535
{
36-
if constexpr (TRIE_LOG_HASH_RECORDS)
36+
if constexpr (trie::TRIE_LOG_HASH_RECORDS)
3737
{
38-
hash_log = std::make_optional<trie::HashLog<trie_prefix_t>>();
38+
hash_log.emplace();
3939
}
4040

4141
if constexpr (LOG_TRANSFERS)
4242
{
43-
transfer_logs = std::make_optional<TransferLogs>();
43+
transfer_logs.emplace();
4444
}
4545

4646
}

modlog/account_modification_log.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ AccountModificationLog::AccountModificationLog()
2626
, mtx()
2727
, deleter()
2828
{
29-
if constexpr (TRIE_LOG_HASH_RECORDS)
29+
if constexpr (trie::TRIE_LOG_HASH_RECORDS)
3030
{
31-
hash_log = std::make_optional<trie::HashLog<AccountIDPrefix>>();
31+
hash_log.emplace();
3232
}
3333
};
3434

0 commit comments

Comments
 (0)