[libcxx] r180679 - Use reinterpret_casts directly in place of C-style casts.
Joerg Sonnenberger
joerg at bec.de
Sat Apr 27 12:12:36 PDT 2013
Author: joerg
Date: Sat Apr 27 14:12:36 2013
New Revision: 180679
URL: http://llvm.org/viewvc/llvm-project?rev=180679&view=rev
Log:
Use reinterpret_casts directly in place of C-style casts.
Modified:
libcxx/trunk/src/iostream.cpp
Modified: libcxx/trunk/src/iostream.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/iostream.cpp?rev=180679&r1=180678&r2=180679&view=diff
==============================================================================
--- libcxx/trunk/src/iostream.cpp (original)
+++ libcxx/trunk/src/iostream.cpp Sat Apr 27 14:12:36 2013
@@ -54,13 +54,13 @@ ios_base::Init::Init()
ios_base::Init::~Init()
{
- ostream* cout_ptr = (ostream*)cout;
- ostream* clog_ptr = (ostream*)clog;
+ ostream* cout_ptr = reinterpret_cast<ostream*>(cout);
+ ostream* clog_ptr = reinterpret_cast<ostream*>(clog);
cout_ptr->flush();
clog_ptr->flush();
- wostream* wcout_ptr = (wostream*)wcout;
- wostream* wclog_ptr = (wostream*)wclog;
+ wostream* wcout_ptr = reinterpret_cast<wostream*>(wcout);
+ wostream* wclog_ptr = reinterpret_cast<wostream*>(wclog);
wcout_ptr->flush();
wclog_ptr->flush();
}
More information about the cfe-commits
mailing list