mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace Optional with std::optional
This commit is contained in:
parent
34ad551efc
commit
e700182f44
15 changed files with 39 additions and 198 deletions
|
@ -509,7 +509,7 @@ void ChatPrompt::addToHistory(const std::wstring &line)
|
|||
auto entry = m_history.begin() + m_history_index;
|
||||
if (entry->saved && entry->line == line) {
|
||||
entry->line = *entry->saved;
|
||||
entry->saved = nullopt;
|
||||
entry->saved = std::nullopt;
|
||||
// Remove potential duplicates
|
||||
auto dup_before = std::find(m_history.begin(), entry, *entry);
|
||||
if (dup_before != entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue