No real changes, just use const_cast<> instead of C casts.

Replace many comments indicating that the C cast used was really a
const_cast<> with the proper cast itself. There is no reason to not use it any
longer, all the supported compilers understand it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-22 14:17:30 +00:00
parent 9513aa80ce
commit f48a115976
13 changed files with 25 additions and 29 deletions

View File

@@ -414,7 +414,7 @@ bool wxBitmap::CopyFromDIB(const wxDIB& dib)
if ( !hbitmap )
return false;
#else // ALWAYS_USE_DIB
HBITMAP hbitmap = ((wxDIB &)dib).Detach(); // const_cast
HBITMAP hbitmap = const_cast<wxDIB &>(dib).Detach();
#endif // SOMETIMES_USE_DIB/ALWAYS_USE_DIB
UnRef();
@@ -493,7 +493,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
else
{
// bits should already be in Windows standard format
data = (char *)bits; // const_cast is harmless
data = const_cast<char *>(bits);
}
HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data);