From 46364f5a2859fea503cf364075260c97f1222f56 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 2 Feb 2017 09:51:59 +1100 Subject: Using better checked static_cast instead of reinterpret_cast for void*. --- lexlib/WordList.cxx | 2 +- src/ScintillaBase.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx index 7741fe093..64a2a50c0 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -115,7 +115,7 @@ static int cmpWords(const void *a, const void *b) { } static void SortWordList(char **words, unsigned int len) { - qsort(reinterpret_cast(words), len, sizeof(*words), cmpWords); + qsort(static_cast(words), len, sizeof(*words), cmpWords); } #endif diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 08b9fe829..ac1a46655 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -202,7 +202,7 @@ int ScintillaBase::KeyCommand(unsigned int iMessage) { } void ScintillaBase::AutoCompleteDoubleClick(void *p) { - ScintillaBase *sci = reinterpret_cast(p); + ScintillaBase *sci = static_cast(p); sci->AutoCompleteCompleted(0, SC_AC_DOUBLECLICK); } -- cgit v1.2.3