This commit is contained in:
orbitcowboy 2015-09-09 08:53:22 +02:00
commit 42b3bc68a5
1 changed files with 8 additions and 6 deletions

View File

@ -1991,6 +1991,7 @@ void CheckClass::checkConstError2(const Token *tok1, const Token *tok2, const st
// ClassCheck: Check that initializer list is in declared order. // ClassCheck: Check that initializer list is in declared order.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
namespace { // avoid one-definition-rule violation
struct VarInfo { struct VarInfo {
VarInfo(const Variable *_var, const Token *_tok) VarInfo(const Variable *_var, const Token *_tok)
: var(_var), tok(_tok) { } : var(_var), tok(_tok) { }
@ -1998,6 +1999,7 @@ struct VarInfo {
const Variable *var; const Variable *var;
const Token *tok; const Token *tok;
}; };
}
void CheckClass::initializerListOrder() void CheckClass::initializerListOrder()
{ {