File tree 5 files changed +202
-185
lines changed
5 files changed +202
-185
lines changed Original file line number Diff line number Diff line change @@ -48,5 +48,5 @@ QString AST::toString(TokenStream *stream) const
48
48
{
49
49
const Token &tk = stream->token ((int ) start_token);
50
50
const Token &end_tk = stream->token ((int ) end_token);
51
- return QString::fromLatin1 (tk.text + tk.position , end_tk.position - tk.position );
51
+ return QString::fromLatin1 (tk.text + tk.position , static_cast < int >( end_tk.position - tk.position ) );
52
52
}
Original file line number Diff line number Diff line change @@ -817,7 +817,7 @@ void Binder::visitQEnums(QEnumsAST *node)
817
817
const Token &start = _M_token_stream->token ((int ) node->start_token );
818
818
const Token &end = _M_token_stream->token ((int ) node->end_token );
819
819
QStringList enum_list = QString::fromLatin1 (start.text + start.position ,
820
- end.position - start.position ).split (' ' );
820
+ static_cast < int >( end.position - start.position ) ).split (' ' );
821
821
822
822
ScopeModelItem scope = currentScope ();
823
823
for (int i = 0 ; i < enum_list.size (); ++i) {
@@ -833,7 +833,7 @@ void Binder::visitQProperty(QPropertyAST *node)
833
833
const Token &start = _M_token_stream->token ((int ) node->start_token );
834
834
const Token &end = _M_token_stream->token ((int ) node->end_token );
835
835
QString property = QString::fromLatin1 (start.text + start.position ,
836
- end.position - start.position );
836
+ static_cast < int >( end.position - start.position ) );
837
837
_M_current_class->addPropertyDeclaration (property);
838
838
}
839
839
Original file line number Diff line number Diff line change @@ -168,10 +168,10 @@ class TokenStream
168
168
inline std::size_t matchingBrace (std::size_t i) const
169
169
{ return tokens[i].extra .right_brace ; }
170
170
171
- inline Token &operator [](int i)
171
+ inline Token &operator [](std:: size_t i)
172
172
{ return tokens[i]; }
173
173
174
- inline const Token &token (int i) const
174
+ inline const Token &token (std:: size_t i) const
175
175
{ return tokens[i]; }
176
176
177
177
private:
You can’t perform that action at this time.
0 commit comments