aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-06-22 13:46:50 +1000
committerNeil <nyamatongwe@gmail.com>2014-06-22 13:46:50 +1000
commit9b20d0e0e8c247f84b367a5d5534f0a35cd59b7f (patch)
tree384bf6a5200da34f00f64fd59113db22b7861a5a /src/PositionCache.cxx
parent47ac30dfae520dd56e0c4cd20827d65bae25e073 (diff)
downloadscintilla-mirror-9b20d0e0e8c247f84b367a5d5534f0a35cd59b7f.tar.gz
Extra casting to prevent warnings from cppcheck.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index f61999a4b..b81fe5930 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -559,7 +559,7 @@ void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_,
for (unsigned int i=0; i<len; i++) {
positions[i] = positions_[i];
}
- memcpy(reinterpret_cast<char *>(positions + len), s_, len);
+ memcpy(reinterpret_cast<char *>(reinterpret_cast<void *>(positions + len)), s_, len);
}
}
@@ -578,7 +578,7 @@ void PositionCacheEntry::Clear() {
bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_,
unsigned int len_, XYPOSITION *positions_) const {
if ((styleNumber == styleNumber_) && (len == len_) &&
- (memcmp(reinterpret_cast<char *>(positions + len), s_, len)== 0)) {
+ (memcmp(reinterpret_cast<char *>(reinterpret_cast<void *>(positions + len)), s_, len)== 0)) {
for (unsigned int i=0; i<len; i++) {
positions_[i] = positions[i];
}