[libxml++] Replace a C-style cast with static_cast<>().



commit 0fa185ae51ed0a5149fc1c02ac3a4b2f1df7cee7
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Dec 12 09:13:49 2016 +0100

    Replace a C-style cast with static_cast<>().
    
    Noticed by cppcheck.

 libxml++/parsers/textreader.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libxml++/parsers/textreader.cc b/libxml++/parsers/textreader.cc
index ef2f8b9..75a2c68 100644
--- a/libxml++/parsers/textreader.cc
+++ b/libxml++/parsers/textreader.cc
@@ -360,7 +360,7 @@ void TextReader::setup_exceptions()
 
 void TextReader::on_libxml_error(void* arg, const char* msg, int severity, void* /* locator */)
 {
-  auto ths = (TextReader*)arg;
+  auto ths = static_cast<TextReader*>(arg);
   ths->severity_ = severity;
   ths->error_ = msg ? msg : "unknown parse error";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]