GUI: fixed a bug in BeaTokenizer::TokenEquals (size doesn't matter now per default)
This commit is contained in:
parent
44138bb4cf
commit
71603c82bb
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue