1
0
Fork 0

GUI: fixed a bug in BeaTokenizer::TokenEquals (size doesn't matter now per default)

This commit is contained in:
Mr. eXoDia 2014-08-08 16:23:12 +02:00
parent 44138bb4cf
commit 71603c82bb
2 changed files with 3 additions and 3 deletions

View File

@ -635,13 +635,13 @@ bool BeaTokenizer::IsHighlightableToken(const BeaSingleToken* token)
return true; return true;
} }
bool BeaTokenizer::TokenEquals(const BeaSingleToken* a, const BeaSingleToken* b) bool BeaTokenizer::TokenEquals(const BeaSingleToken* a, const BeaSingleToken* b, bool ignoreSize)
{ {
if(!a || !b) if(!a || !b)
return false; return false;
if(a->value.size != 0) //we have a value if(a->value.size != 0) //we have a value
{ {
if(a->value.size != b->value.size) if(!ignoreSize && a->value.size != b->value.size)
return false; return false;
else if(a->value.value != b->value.value) else if(a->value.value != b->value.value)
return false; return false;

View File

@ -84,7 +84,7 @@ public:
static void TokenToRichText(const BeaInstructionToken* instr, QList<RichTextPainter::CustomRichText_t>* richTextList, const BeaSingleToken* highlightToken); static void TokenToRichText(const BeaInstructionToken* instr, QList<RichTextPainter::CustomRichText_t>* richTextList, const BeaSingleToken* highlightToken);
static bool TokenFromX(const BeaInstructionToken* instr, BeaSingleToken* token, int x, int charwidth); static bool TokenFromX(const BeaInstructionToken* instr, BeaSingleToken* token, int x, int charwidth);
static bool IsHighlightableToken(const BeaSingleToken* token); static bool IsHighlightableToken(const BeaSingleToken* token);
static bool TokenEquals(const BeaSingleToken* a, const BeaSingleToken* b); static bool TokenEquals(const BeaSingleToken* a, const BeaSingleToken* b, bool ignoreSize = true);
private: private:
//variables //variables