aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-04 17:13:20 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-04 17:13:21 +0200
commita605c0da08c2cfe700b0b431f289a47509a28189 (patch)
tree260da73e49af7c2e0130da3ebb4062e30dd32690 /src/blockchain_db/lmdb/db_lmdb.cpp
parentMerge pull request #4869 (diff)
parentlmdb: fix gcc 7.3.0 'implicit-fallthrough' warning (diff)
downloadmonero-a605c0da08c2cfe700b0b431f289a47509a28189.tar.xz
Merge pull request #4872
fc99f177 lmdb: fix gcc 7.3.0 'implicit-fallthrough' warning (xiphon)
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.cpp')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 13688abe8..5af5d1903 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -4369,16 +4369,12 @@ void BlockchainLMDB::migrate_2_3()
void BlockchainLMDB::migrate(const uint32_t oldversion)
{
- switch(oldversion) {
- case 0:
- migrate_0_1(); /* FALLTHRU */
- case 1:
- migrate_1_2(); /* FALLTHRU */
- case 2:
- migrate_2_3(); /* FALLTHRU */
- default:
- ;
- }
+ if (oldversion < 1)
+ migrate_0_1();
+ if (oldversion < 2)
+ migrate_1_2();
+ if (oldversion < 3)
+ migrate_2_3();
}
} // namespace cryptonote