Running astyle [ci skip]
This commit is contained in:
parent
f90b05ea7c
commit
195d413986
|
@ -242,9 +242,9 @@ void CheckType::checkSignConversion()
|
|||
if (!tok1)
|
||||
continue;
|
||||
const ValueFlow::Value* negativeValue =
|
||||
ValueFlow::findValue(tok1->values(), mSettings, [&](const ValueFlow::Value& v) {
|
||||
return !v.isImpossible() && v.isIntValue() && (v.intvalue <= -1 || v.wideintvalue <= -1);
|
||||
});
|
||||
ValueFlow::findValue(tok1->values(), mSettings, [&](const ValueFlow::Value& v) {
|
||||
return !v.isImpossible() && v.isIntValue() && (v.intvalue <= -1 || v.wideintvalue <= -1);
|
||||
});
|
||||
if (!negativeValue)
|
||||
continue;
|
||||
if (tok1->valueType() && tok1->valueType()->sign != ValueType::Sign::UNSIGNED)
|
||||
|
|
|
@ -6336,8 +6336,8 @@ static std::vector<ValueFlow::Value> makeContainerSizeValue(const Token* tok, bo
|
|||
}
|
||||
|
||||
static std::vector<ValueFlow::Value> getInitListSize(const Token* tok,
|
||||
const Library::Container* container,
|
||||
bool known = true)
|
||||
const Library::Container* container,
|
||||
bool known = true)
|
||||
{
|
||||
std::vector<const Token*> args = getArguments(tok);
|
||||
// Strings dont use an init list
|
||||
|
@ -7023,8 +7023,8 @@ std::string ValueFlow::eitherTheConditionIsRedundant(const Token *condition)
|
|||
}
|
||||
|
||||
const ValueFlow::Value* ValueFlow::findValue(const std::list<ValueFlow::Value>& values,
|
||||
const Settings* settings,
|
||||
std::function<bool(const ValueFlow::Value&)> pred)
|
||||
const Settings* settings,
|
||||
std::function<bool(const ValueFlow::Value&)> pred)
|
||||
{
|
||||
const ValueFlow::Value* ret = nullptr;
|
||||
for (const ValueFlow::Value& v : values) {
|
||||
|
|
|
@ -325,13 +325,13 @@ namespace ValueFlow {
|
|||
|
||||
enum class LifetimeKind {
|
||||
// Pointer points to a member of lifetime
|
||||
Object,
|
||||
Object,
|
||||
// A member of object points to the lifetime
|
||||
SubObject,
|
||||
SubObject,
|
||||
// Lambda has captured lifetime(similiar to SubObject)
|
||||
Lambda,
|
||||
Lambda,
|
||||
// Iterator points to the lifetime of a container(similiar to Object)
|
||||
Iterator,
|
||||
Iterator,
|
||||
// A pointer that holds the address of the lifetime
|
||||
Address
|
||||
} lifetimeKind;
|
||||
|
|
Loading…
Reference in New Issue