minor cleanups. initialize members in initialization list

This commit is contained in:
Zachary Blair 2014-01-06 08:02:04 +01:00 committed by Daniel Marjamäki
parent c4fa3bb137
commit 4a2da09491
3 changed files with 30 additions and 17 deletions

View File

@ -98,8 +98,12 @@ public:
class ArgumentChecks { class ArgumentChecks {
public: public:
ArgumentChecks() { ArgumentChecks() :
notbool = notnull = notuninit = formatstr = strz = false; notbool(false),
notnull(false),
notuninit(false),
formatstr(false),
strz(false) {
} }
bool notbool; bool notbool;

View File

@ -65,6 +65,10 @@ public:
} needInitialization; } needInitialization;
struct BaseInfo { struct BaseInfo {
BaseInfo() :
type(NULL), nameTok(NULL), access(Public), isVirtual(false) {
}
std::string name; std::string name;
const Type* type; const Type* type;
const Token* nameTok; const Token* nameTok;
@ -73,6 +77,10 @@ public:
}; };
struct FriendInfo { struct FriendInfo {
FriendInfo() :
nameStart(NULL), nameEnd(NULL), type(NULL) {
}
const Token* nameStart; const Token* nameStart;
const Token* nameEnd; const Token* nameEnd;
std::string name; std::string name;

View File

@ -370,6 +370,7 @@ Token * Tokenizer::deleteInvalidTypedef(Token *typeDef)
} }
struct Space { struct Space {
Space() : classEnd(NULL), isNamespace(false) { }
std::string className; std::string className;
const Token * classEnd; const Token * classEnd;
bool isNamespace; bool isNamespace;
@ -7531,23 +7532,23 @@ bool Tokenizer::duplicateDefinition(Token ** tokPtr, const Token * name) const
class EnumValue { class EnumValue {
public: public:
EnumValue() { EnumValue() :
name = 0; name(NULL),
value = 0; value(NULL),
start = 0; start(NULL),
end = 0; end(NULL) {
} }
EnumValue(const EnumValue &ev) { EnumValue(const EnumValue &ev) :
name = ev.name; name(ev.name),
value = ev.value; value(ev.value),
start = ev.start; start(ev.start),
end = ev.end; end(ev.end) {
} }
EnumValue(Token *name_, Token *value_, Token *start_, Token *end_) { EnumValue(Token *name_, Token *value_, Token *start_, Token *end_) :
name = name_; name(name_),
value = value_; value(value_),
start = start_; start(start_),
end = end_; end(end_) {
} }
void simplify(const std::map<std::string, EnumValue> &enumValues) { void simplify(const std::map<std::string, EnumValue> &enumValues) {