diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-24 09:29:24 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-24 09:29:24 +1000 |
commit | 14483d14cbf29366f6f0839bd3683f3bfb8c046a (patch) | |
tree | afa33b60e13299f20bad206ff28e6339d0f99d59 /src/CellBuffer.cxx | |
parent | a55a7b13deaaf1b19b82ecdbc997d3e457677e26 (diff) | |
download | scintilla-mirror-14483d14cbf29366f6f0839bd3683f3bfb8c046a.tar.gz |
Removing style byte indicators.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index c05060865..0c56c9e92 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -413,25 +413,24 @@ const char *CellBuffer::InsertString(int position, const char *s, int insertLeng return data; } -bool CellBuffer::SetStyleAt(int position, char styleValue, char mask) { - styleValue &= mask; +bool CellBuffer::SetStyleAt(int position, char styleValue) { char curVal = style.ValueAt(position); - if ((curVal & mask) != styleValue) { - style.SetValueAt(position, static_cast<char>((curVal & ~mask) | styleValue)); + if (curVal != styleValue) { + style.SetValueAt(position, styleValue); return true; } else { return false; } } -bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue, char mask) { +bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue) { bool changed = false; PLATFORM_ASSERT(lengthStyle == 0 || (lengthStyle > 0 && lengthStyle + position <= style.Length())); while (lengthStyle--) { char curVal = style.ValueAt(position); - if ((curVal & mask) != styleValue) { - style.SetValueAt(position, static_cast<char>((curVal & ~mask) | styleValue)); + if (curVal != styleValue) { + style.SetValueAt(position, styleValue); changed = true; } position++; |