Commit 6193824f authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

SemanticTokens: Use size_t as argument for type

Should fix the case of idx = -1 being rightfully out of bounds.

BUG: 447553
parent d535bf7f
Pipeline #115045 passed with stage
in 6 minutes and 23 seconds
......@@ -51,7 +51,7 @@ public:
*/
void initialize(const std::vector<QString> &types);
KTextEditor::Attribute::Ptr attributeForTokenType(int idx) const
KTextEditor::Attribute::Ptr attributeForTokenType(size_t idx) const
{
if (idx >= totalTokenTypes) {
return {};
......@@ -68,7 +68,7 @@ private:
Q_SLOT void themeChange(KTextEditor::Editor *e);
void refresh(const std::vector<TokenType> &m_tokenTypes);
int totalTokenTypes;
size_t totalTokenTypes;
std::vector<KTextEditor::Attribute::Ptr> sharedAttrs;
KTextEditor::Attribute::Ptr fixedAttrs[7];
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment