forked from qt-creator/qt-creator
QmlJs: Initialize members
Change-Id: I15a3ec660608266595a8b7a12b59016cc28331af Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -72,6 +72,7 @@ static inline QChar convertUnicode(QChar c1, QChar c2, QChar c3, QChar c4)
|
||||
Lexer::Lexer(Engine *engine)
|
||||
: _engine(engine)
|
||||
, _codePtr(0)
|
||||
, _endPtr(0)
|
||||
, _lastLinePtr(0)
|
||||
, _tokenLinePtr(0)
|
||||
, _tokenStartPtr(0)
|
||||
|
||||
@@ -78,6 +78,7 @@ Parser::Parser(Engine *engine):
|
||||
location_stack(0),
|
||||
string_stack(0),
|
||||
program(0),
|
||||
yylval(0),
|
||||
first_token(0),
|
||||
last_token(0)
|
||||
{
|
||||
|
||||
@@ -324,7 +324,7 @@ protected:
|
||||
class MarkUnreachableCode : protected ReachesEndCheck
|
||||
{
|
||||
QList<Message> _messages;
|
||||
bool _emittedWarning;
|
||||
bool _emittedWarning = false;
|
||||
|
||||
public:
|
||||
QList<Message> operator()(Node *ast)
|
||||
|
||||
@@ -43,6 +43,7 @@ CodeFormatter::BlockData::BlockData()
|
||||
CodeFormatter::CodeFormatter()
|
||||
: m_indentDepth(0)
|
||||
, m_tabSize(4)
|
||||
, m_tokenIndex(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
int m_depth;
|
||||
int m_indent;
|
||||
int m_indentIncrement;
|
||||
bool m_emptyContext;
|
||||
bool m_emptyContext = false;
|
||||
ContextPtr m_context;
|
||||
QSet<const Value *> m_visited;
|
||||
QString m_description;
|
||||
|
||||
@@ -90,11 +90,11 @@ class Rewriter : protected Visitor
|
||||
QList<Split> _possibleSplits;
|
||||
QTextDocument _resultDocument;
|
||||
SimpleFormatter _formatter;
|
||||
int _indent;
|
||||
int _nextComment;
|
||||
int _lastNewlineOffset;
|
||||
bool _hadEmptyLine;
|
||||
int _binaryExpDepth;
|
||||
int _indent = 0;
|
||||
int _nextComment = 0;
|
||||
int _lastNewlineOffset = -1;
|
||||
bool _hadEmptyLine = false;
|
||||
int _binaryExpDepth = 0;
|
||||
|
||||
public:
|
||||
Rewriter(Document::Ptr doc)
|
||||
|
||||
@@ -56,7 +56,7 @@ private:
|
||||
|
||||
QList<AST::Node *> _result;
|
||||
Document::Ptr _doc;
|
||||
quint32 _offset;
|
||||
quint32 _offset = 0;
|
||||
};
|
||||
|
||||
} // namespace QmlJS
|
||||
|
||||
@@ -254,7 +254,7 @@ QList<Type> Message::allMessageTypes()
|
||||
}
|
||||
|
||||
Message::Message()
|
||||
: type(UnknownType), severity(Hint)
|
||||
: type(UnknownType)
|
||||
{}
|
||||
|
||||
Message::Message(Type type,
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
AST::SourceLocation location;
|
||||
QString message;
|
||||
Type type;
|
||||
Severity::Enum severity;
|
||||
Severity::Enum severity = Severity::Enum::Hint;
|
||||
|
||||
static const PrototypeMessageData prototypeForMessageType(Type type);
|
||||
};
|
||||
|
||||
@@ -91,8 +91,8 @@ private:
|
||||
QString _errorMessage;
|
||||
QString _warningMessage;
|
||||
QHash<QString, LanguageUtils::FakeMetaObject::ConstPtr> *_objects;
|
||||
QList<ModuleApiInfo> *_moduleApis;
|
||||
QStringList *_dependencies;
|
||||
QList<ModuleApiInfo> *_moduleApis = nullptr;
|
||||
QStringList *_dependencies = nullptr;
|
||||
};
|
||||
|
||||
} // namespace QmlJS
|
||||
|
||||
Reference in New Issue
Block a user