Merge #21415: refactor: remove Optional & nullopt

ebc4ab721b refactor: post Optional<> removal cleanups (fanquake)
57e980d13c scripted-diff: remove Optional & nullopt (fanquake)

Pull request description:

  Same rationale & motivation as #21404, which turned out to be quite low in the number of potential conflicts. Lets see what the bot has to say here.

ACKs for top commit:
  practicalswift:
    cr ACK ebc4ab721b: patch looks correct
  jnewbery:
    utACK ebc4ab721b
  laanwj:
    Code review ACK ebc4ab721b

Tree-SHA512: 550fbeef09b9d35ddefaa805d1755c18c8fd499c4b0f77ebfece8c20296a7abd1cf6c699e2261f92fe3552deeb7555ec2a2287ffe3ab9e98bb9f8612a4d43be3
This commit is contained in:
Wladimir J. van der Laan
2021-03-17 10:52:16 +01:00
51 changed files with 184 additions and 194 deletions

View File

@@ -7,7 +7,6 @@
#include <clientversion.h>
#include <hash.h> // For Hash()
#include <key.h> // For CKey
#include <optional.h>
#include <sync.h>
#include <test/util/logging.h>
#include <test/util/setup_common.h>
@@ -23,6 +22,7 @@
#include <util/vector.h>
#include <array>
#include <optional>
#include <stdint.h>
#include <string.h>
#include <thread>
@@ -228,9 +228,9 @@ public:
bool default_int = false;
bool default_bool = false;
const char* string_value = nullptr;
Optional<int64_t> int_value;
Optional<bool> bool_value;
Optional<std::vector<std::string>> list_value;
std::optional<int64_t> int_value;
std::optional<bool> bool_value;
std::optional<std::vector<std::string>> list_value;
const char* error = nullptr;
explicit Expect(util::SettingsValue s) : setting(std::move(s)) {}