Ran AStyle, fixed VS2015 warning in symboldatabase.h
This commit is contained in:
parent
9bafa3bf25
commit
cd84d78e92
|
@ -243,7 +243,7 @@ void CheckClass::checkExplicitConstructors()
|
|||
for (std::list<Function>::const_iterator func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
|
||||
|
||||
// We are looking for constructors, which are meeting following criteria:
|
||||
// 1) Constructor is declared with a single parameter
|
||||
// 1) Constructor is declared with a single parameter
|
||||
// 2) Constructor is not declared as explicit
|
||||
// 3) It is not a copy/move constructor of non-abstract class
|
||||
// 4) Constructor is not marked as delete (programmer can mark the default constructor as deleted, which is ok)
|
||||
|
@ -254,8 +254,7 @@ void CheckClass::checkExplicitConstructors()
|
|||
// We must decide, if it is not a copy/move constructor, or it is a copy/move constructor of abstract class.
|
||||
if (func->type != Function::eCopyConstructor && func->type != Function::eMoveConstructor) {
|
||||
noExplicitConstructorError(func->tokenDef, scope->className, scope->type == Scope::eStruct);
|
||||
}
|
||||
else if (isAbstractClass) {
|
||||
} else if (isAbstractClass) {
|
||||
noExplicitCopyMoveConstructorError(func->tokenDef, scope->className, scope->type == Scope::eStruct);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -770,7 +770,7 @@ public:
|
|||
static bool argsMatch(const Scope *info, const Token *first, const Token *second, const std::string &path, unsigned int depth);
|
||||
|
||||
private:
|
||||
bool isImplicitlyVirtual_rec(const ::Type* type, bool& safe) const;
|
||||
bool isImplicitlyVirtual_rec(const ::Type* baseType, bool& safe) const;
|
||||
|
||||
unsigned int flags;
|
||||
};
|
||||
|
|
|
@ -223,12 +223,12 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkExplicitConstructors("class Class \n"
|
||||
"{ \n"
|
||||
" Class() = delete; \n"
|
||||
" Class(const Class& other) = delete; \n"
|
||||
" Class(Class&& other) = delete; \n"
|
||||
" virtual int i() = 0; \n"
|
||||
"};");
|
||||
"{ \n"
|
||||
" Class() = delete; \n"
|
||||
" Class(const Class& other) = delete; \n"
|
||||
" Class(Class&& other) = delete; \n"
|
||||
" virtual int i() = 0; \n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkExplicitConstructors("class Class \n"
|
||||
|
|
Loading…
Reference in New Issue