mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
scripted-diff: disable unimplemented ArgsManager BOOL/INT/STRING flags
This commit does not change behavior in any way. See previous commit for complete rationale, but these flags are being disabled because they aren't implemented and will otherwise break backwards compatibility when they are implemented. -BEGIN VERIFY SCRIPT- sed -i 's:\(ALLOW_.*\) \(//!< unimplemented\):// \1\2:' src/util/system.h sed -i '/DISALLOW_NEGATION.*scripted-diff/d' src/util/system.cpp git grep -l 'ArgsManager::ALLOW_\(INT\|STRING\)' | xargs sed -i 's/ArgsManager::ALLOW_\(INT\|STRING\)/ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION/g' git grep -l 'ALLOW_BOOL' -- ':!src/util/system.h' | xargs sed -i 's/ALLOW_BOOL/ALLOW_ANY/g' -END VERIFY SCRIPT-
This commit is contained in:
@@ -652,7 +652,6 @@ void ArgsManager::AddArg(const std::string& name, const std::string& help, unsig
|
||||
|
||||
LOCK(cs_args);
|
||||
std::map<std::string, Arg>& arg_map = m_available_args[cat];
|
||||
if ((flags & (ALLOW_ANY | ALLOW_BOOL)) == 0) flags |= DISALLOW_NEGATION; // Temporary, removed in next scripted-diff
|
||||
auto ret = arg_map.emplace(arg_name, Arg{name.substr(eq_index, name.size() - eq_index), help, flags});
|
||||
assert(ret.second); // Make sure an insertion actually happened
|
||||
|
||||
|
||||
@@ -164,10 +164,10 @@ public:
|
||||
*/
|
||||
enum Flags : uint32_t {
|
||||
ALLOW_ANY = 0x01, //!< disable validation
|
||||
ALLOW_BOOL = 0x02, //!< unimplemented, draft implementation in #16545
|
||||
ALLOW_INT = 0x04, //!< unimplemented, draft implementation in #16545
|
||||
ALLOW_STRING = 0x08, //!< unimplemented, draft implementation in #16545
|
||||
ALLOW_LIST = 0x10, //!< unimplemented, draft implementation in #16545
|
||||
// ALLOW_BOOL = 0x02, //!< unimplemented, draft implementation in #16545
|
||||
// ALLOW_INT = 0x04, //!< unimplemented, draft implementation in #16545
|
||||
// ALLOW_STRING = 0x08, //!< unimplemented, draft implementation in #16545
|
||||
// ALLOW_LIST = 0x10, //!< unimplemented, draft implementation in #16545
|
||||
DISALLOW_NEGATION = 0x20, //!< disallow -nofoo syntax
|
||||
|
||||
DEBUG_ONLY = 0x100,
|
||||
|
||||
Reference in New Issue
Block a user