aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/LexAccessor.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-03 07:44:07 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-03 07:44:07 +1000
commit9ffdbac7f017c64ddb7133268b45a8a992389591 (patch)
treef21ea44a7be58883d1aaf9bd3827b74b8843dc65 /lexlib/LexAccessor.h
parente680914ac0baa9285554ed574ec6ca6d7686346a (diff)
downloadscintilla-mirror-9ffdbac7f017c64ddb7133268b45a8a992389591.tar.gz
Avoid casts.
Diffstat (limited to 'lexlib/LexAccessor.h')
-rw-r--r--lexlib/LexAccessor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h
index 87557d8c1..e1043c05f 100644
--- a/lexlib/LexAccessor.h
+++ b/lexlib/LexAccessor.h
@@ -157,13 +157,14 @@ public:
if (validLen + (pos - startSeg + 1) >= bufferSize)
Flush();
+ char attr = static_cast<char>(chAttr);
if (validLen + (pos - startSeg + 1) >= bufferSize) {
// Too big for buffer so send directly
- pAccess->SetStyleFor(pos - startSeg + 1, static_cast<char>(chAttr));
+ pAccess->SetStyleFor(pos - startSeg + 1, attr);
} else {
for (Sci_PositionU i = startSeg; i <= pos; i++) {
assert((startPosStyling + validLen) < Length());
- styleBuf[validLen++] = static_cast<char>(chAttr);
+ styleBuf[validLen++] = attr;
}
}
}