Is there any drawbacks for using "this" pointer?
For example:
Window_Properties::Window_Properties(wchar_t* wnd_title, wchar_t* wnd_class_name): window_width(1280), window_height(720), window_X(0), window_Y(0)
{
this->window_title = new wchar_t[ wcslen( wnd_title ) ];
if( this->window_title )
{
wcscpy( this->window_title, wnd_title );
}
this->window_class_name = new wchar_t[ wcslen( wnd_class_name ) ];
if( this->window_class_name )
{
wcscpy( this->window_class_name, wnd_class_name );
}
}
verses
Window_Properties::Window_Properties(wchar_t* wnd_title, wchar_t* wnd_class_name): window_width(1280), window_height(720), window_X(0), window_Y(0)
{
window_title = new wchar_t[ wcslen( wnd_title ) ];
if( window_title )
{
wcscpy( window_title, wnd_title );
}
window_class_name = new wchar_t[ wcslen( wnd_class_name ) ];
if( window_class_name )
{
wcscpy( window_class_name, wnd_class_name );
}
}
Is it a good practice to use "this" all the time and whenever possible? (for clarity and preventing future errors)