aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla_backports/6196_e4f249dbdc30.patch
blob: 3ca9040b264b4d0393bd21b3752cee512059e031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# HG changeset patch
# User Neil <nyamatongwe@gmail.com>
# Date 1492586191 -36000
# Node ID e4f249dbdc30e33291297c312042b760f825f4c0
# Parent  ba90de635fc390837399a66841392d1e87c829d5
Drop reinterpret_cast when can implicit cast to void* or const void*.

diff -r ba90de635fc3 -r e4f249dbdc30 src/PositionCache.cxx
--- a/src/PositionCache.cxx	Wed Apr 19 15:30:08 2017 +1000
+++ b/src/PositionCache.cxx	Wed Apr 19 17:16:31 2017 +1000
@@ -575,7 +575,7 @@
 		for (unsigned int i=0; i<len; i++) {
 			positions[i] = positions_[i];
 		}
-		memcpy(reinterpret_cast<void *>(positions + len), s_, len);
+		memcpy(positions + len, s_, len);
 	}
 }
 
@@ -594,7 +594,7 @@
 bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_,
 	unsigned int len_, XYPOSITION *positions_) const {
 	if ((styleNumber == styleNumber_) && (len == len_) &&
-		(memcmp(reinterpret_cast<void *>(positions + len), s_, len)== 0)) {
+		(memcmp(positions + len, s_, len)== 0)) {
 		for (unsigned int i=0; i<len; i++) {
 			positions_[i] = positions[i];
 		}