Don't use m_ prefix in the names of non-member variables

Using "m_" prefix for non-member variables is not in line with the naming
convention and hence is misleading.
This commit is contained in:
Artur Wieczorek
2019-09-29 16:23:12 +02:00
parent ac9c4d06e2
commit 93f1384f7e

View File

@@ -1530,12 +1530,12 @@ bool wxMask::OSXCreate(const wxMemoryBuffer& data,int width , int height , int b
// Create a mask from a mono bitmap (copies the bitmap). // Create a mask from a mono bitmap (copies the bitmap).
bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap) bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap)
{ {
int m_width, m_height, m_bytesPerRow; int width, height, bytesPerRow;
m_width = bitmap.GetWidth() ; width = bitmap.GetWidth() ;
m_height = bitmap.GetHeight() ; height = bitmap.GetHeight() ;
DoCreateMaskBitmap(m_width, m_height); DoCreateMaskBitmap(width, height);
m_bytesPerRow = GetBytesPerRow(); bytesPerRow = GetBytesPerRow();
// pixel access needs a non-const bitmap currently // pixel access needs a non-const bitmap currently
wxBitmap bmp(bitmap); wxBitmap bmp(bitmap);
@@ -1547,11 +1547,11 @@ bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap)
wxASSERT( destdatabase != NULL ) ; wxASSERT( destdatabase != NULL ) ;
if ( destdatabase != NULL) if ( destdatabase != NULL)
{ {
for ( int y = 0 ; y < m_height; ++y, destdatabase += m_bytesPerRow ) for ( int y = 0 ; y < height; ++y, destdatabase += bytesPerRow )
{ {
wxNativePixelData::Iterator rowStart = p; wxNativePixelData::Iterator rowStart = p;
unsigned char *destdata = destdatabase ; unsigned char *destdata = destdatabase ;
for ( int x = 0 ; x < m_width ; ++x, ++p ) for ( int x = 0 ; x < width ; ++x, ++p )
{ {
int v = p.Red() + p.Green() + p.Blue(); int v = p.Red() + p.Green() + p.Blue();
wxASSERT_MSG( v == 0 || v == 3*0xFF, "Non-monochrome bitmap supplied" ); wxASSERT_MSG( v == 0 || v == 3*0xFF, "Non-monochrome bitmap supplied" );
@@ -1567,13 +1567,13 @@ bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap)
bool wxMask::InitFromColour(const wxBitmap& bitmap, const wxColour& colour) bool wxMask::InitFromColour(const wxBitmap& bitmap, const wxColour& colour)
{ {
int m_width, m_height, m_bytesPerRow; int width, height, bytesPerRow;
m_width = bitmap.GetWidth() ; width = bitmap.GetWidth() ;
m_height = bitmap.GetHeight() ; height = bitmap.GetHeight() ;
DoCreateMaskBitmap(m_width, m_height); DoCreateMaskBitmap(width, height);
m_bytesPerRow = GetBytesPerRow(); bytesPerRow = GetBytesPerRow();
// pixel access needs a non-const bitmap currently // pixel access needs a non-const bitmap currently
wxBitmap bmp(bitmap); wxBitmap bmp(bitmap);
@@ -1585,11 +1585,11 @@ bool wxMask::InitFromColour(const wxBitmap& bitmap, const wxColour& colour)
wxASSERT( destdatabase != NULL ) ; wxASSERT( destdatabase != NULL ) ;
if ( destdatabase != NULL) if ( destdatabase != NULL)
{ {
for ( int y = 0 ; y < m_height; ++y, destdatabase += m_bytesPerRow ) for ( int y = 0 ; y < height; ++y, destdatabase += bytesPerRow )
{ {
wxNativePixelData::Iterator rowStart = p; wxNativePixelData::Iterator rowStart = p;
unsigned char *destdata = destdatabase ; unsigned char *destdata = destdatabase ;
for ( int x = 0 ; x < m_width ; ++x, ++p ) for ( int x = 0 ; x < width ; ++x, ++p )
{ {
if ( wxColour( p.Red(), p.Green(), p.Blue() ) == colour ) if ( wxColour( p.Red(), p.Green(), p.Blue() ) == colour )
*destdata++ = 0x0 ; *destdata++ = 0x0 ;
@@ -1608,24 +1608,24 @@ bool wxMask::InitFromColour(const wxBitmap& bitmap, const wxColour& colour)
wxBitmap wxMask::GetBitmap() const wxBitmap wxMask::GetBitmap() const
{ {
int m_width, m_height, m_bytesPerRow; int width, height, bytesPerRow;
m_width = GetWidth(); width = GetWidth();
m_height = GetHeight(); height = GetHeight();
m_bytesPerRow = GetBytesPerRow(); bytesPerRow = GetBytesPerRow();
wxBitmap bitmap(m_width, m_height, 32); wxBitmap bitmap(width, height, 32);
wxNativePixelData data(bitmap); wxNativePixelData data(bitmap);
wxNativePixelData::Iterator p(data); wxNativePixelData::Iterator p(data);
const unsigned char* srcbase = static_cast<unsigned char*>(GetRawAccess()); const unsigned char* srcbase = static_cast<unsigned char*>(GetRawAccess());
for (int y = 0; y < m_height; ++y, srcbase += m_bytesPerRow) for (int y = 0; y < height; ++y, srcbase += bytesPerRow)
{ {
wxNativePixelData::Iterator rowStart = p; wxNativePixelData::Iterator rowStart = p;
const unsigned char* src = srcbase; const unsigned char* src = srcbase;
for (int x = 0; x < m_width; ++x, ++p, ++src) for (int x = 0; x < width; ++x, ++p, ++src)
{ {
const unsigned char byte = *src; const unsigned char byte = *src;
wxASSERT( byte == 0 || byte == 0xFF ); wxASSERT( byte == 0 || byte == 0xFF );