QHash: simplify HashSeedStorage::initialize()
By not splitting Q_UNREACHABLE() and the following return, we can get rid of the NOLINT(qt-use-unreachable-return). Change-Id: I3322843e38dabdadb38eea38a6d91b301257fd23 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
0f94430a0f
commit
e37c0c20bc
@ -107,8 +107,7 @@ private:
|
||||
StateResult result = { 0, OverriddenByEnvironment };
|
||||
#ifdef QT_BOOTSTRAPPED
|
||||
Q_UNUSED(which);
|
||||
// NOLINTNEXTLINE(qt-use-unreachable-return): triggers on QT_BOOTSTRAPPED, breaking #else case
|
||||
Q_UNREACHABLE();
|
||||
Q_UNREACHABLE_RETURN(result);
|
||||
#else
|
||||
// can't use qEnvironmentVariableIntValue (reentrancy)
|
||||
const char *seedstr = getenv("QT_HASH_SEED");
|
||||
@ -138,8 +137,8 @@ private:
|
||||
result.requestedSeed = x.data[i];
|
||||
}
|
||||
result.state = JustInitialized;
|
||||
#endif
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline HashSeedStorage::StateResult HashSeedStorage::state(int which)
|
||||
|
Loading…
Reference in New Issue
Block a user