Skip to content

Commit

Permalink
Migrate from mapbox variant to std::variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 20, 2021
1 parent 7518114 commit 35f4e29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ton/ton_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct DecryptPasswordGood {
};

struct Update {
base::variant<
std::variant<
SyncState,
LiteServerQuery,
ConfigUpgrade,
Expand Down
4 changes: 2 additions & 2 deletions ton/ton_wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,12 @@ void Wallet::loadWebResource(const QString &url, Callback<QByteArray> done) {

Fn<void(Update)> Wallet::generateUpdatesCallback() {
return [=](Update update) {
if (const auto sync = base::get_if<SyncState>(&update.data)) {
if (const auto sync = std::get_if<SyncState>(&update.data)) {
if (*sync == _lastSyncStateUpdate) {
return;
}
_lastSyncStateUpdate = *sync;
} else if (const auto upgrade = base::get_if<ConfigUpgrade>(
} else if (const auto upgrade = std::get_if<ConfigUpgrade>(
&update.data)) {
if (*upgrade == ConfigUpgrade::TestnetToMainnet) {
_switchedToMain = true;
Expand Down

0 comments on commit 35f4e29

Please sign in to comment.