mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-01 03:16:09 +02:00
build: Bump minimum supported GCC to g++-9
Also, update the code to use constexpr, which does not work in g++-8. Also, drop the no longer needed build-aux/m4/l_filesystem.m4.
This commit is contained in:
@@ -53,15 +53,14 @@ struct AddressTableEntryLessThan
|
||||
};
|
||||
|
||||
/* Determine address type from address purpose */
|
||||
static AddressTableEntry::Type translateTransactionType(wallet::AddressPurpose purpose, bool isMine)
|
||||
constexpr AddressTableEntry::Type translateTransactionType(wallet::AddressPurpose purpose, bool isMine)
|
||||
{
|
||||
// "refund" addresses aren't shown, and change addresses aren't returned by getAddresses at all.
|
||||
switch (purpose) {
|
||||
case wallet::AddressPurpose::SEND: return AddressTableEntry::Sending;
|
||||
case wallet::AddressPurpose::RECEIVE: return AddressTableEntry::Receiving;
|
||||
case wallet::AddressPurpose::REFUND: return AddressTableEntry::Hidden;
|
||||
// No default case to allow for compiler to warn
|
||||
}
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ struct Announcement {
|
||||
const bool m_is_wtxid : 1;
|
||||
|
||||
/** What state this announcement is in.
|
||||
* This is a uint8_t instead of a State to silence a GCC warning in versions prior to 8.4 and 9.3.
|
||||
* This is a uint8_t instead of a State to silence a GCC warning in versions prior to 9.3.
|
||||
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414 */
|
||||
uint8_t m_state : 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user