Remove unused vars, usage '= default;' and fixed lower scope

This commit is contained in:
germanaizek
2022-05-12 16:36:15 +03:00
committed by ge0rdi
parent 2e43d4c7a1
commit 4f362760b6
7 changed files with 6 additions and 13 deletions

View File

@@ -195,9 +195,10 @@ static TDownloadResult DownloadFile( const wchar_t *url, std::vector<char> &buf,
{ {
if (pProgress && pProgress->IsCanceled()) if (pProgress && pProgress->IsCanceled())
res=DOWNLOAD_CANCEL; res=DOWNLOAD_CANCEL;
const wchar_t *accept[]={L"*/*",NULL};
if (res==DOWNLOAD_OK) if (res==DOWNLOAD_OK)
{ {
const wchar_t* accept[] = { L"*/*",NULL };
HINTERNET hRequest=HttpOpenRequest(hConnect,L"GET",file,NULL,NULL,accept,((components.nScheme==INTERNET_SCHEME_HTTPS)?INTERNET_FLAG_SECURE:0)|(bAcceptCached?0:INTERNET_FLAG_RELOAD),0); HINTERNET hRequest=HttpOpenRequest(hConnect,L"GET",file,NULL,NULL,accept,((components.nScheme==INTERNET_SCHEME_HTTPS)?INTERNET_FLAG_SECURE:0)|(bAcceptCached?0:INTERNET_FLAG_RELOAD),0);
if (hRequest) if (hRequest)
{ {

View File

@@ -127,7 +127,6 @@ VersionData CLanguageSettingsDlg::s_VersionData;
void CLanguageSettingsDlg::AddFlag( const wchar_t *langName, int langId, HBITMAP bmp ) void CLanguageSettingsDlg::AddFlag( const wchar_t *langName, int langId, HBITMAP bmp )
{ {
std::vector<LangInfo>::iterator it=m_LanguageIDs.begin()+1;
int idx=1; int idx=1;
for (;idx<(int)m_LanguageIDs.size();idx++) for (;idx<(int)m_LanguageIDs.size();idx++)
{ {
@@ -205,8 +204,6 @@ void CLanguageSettingsDlg::UpdateFlags( void )
DoEnvironmentSubst(path,_countof(path)); DoEnvironmentSubst(path,_countof(path));
} }
CWindow list=GetDlgItem(IDC_LISTLANGUAGE);
wchar_t find[_MAX_PATH]; wchar_t find[_MAX_PATH];
Sprintf(find,_countof(find),L"%s\\*.dll",path); Sprintf(find,_countof(find),L"%s\\*.dll",path);
WIN32_FIND_DATA data; WIN32_FIND_DATA data;

View File

@@ -16,9 +16,7 @@ CMenuAccessible::CMenuAccessible( CMenuContainer *pOwner )
CreateStdAccessibleObject(pOwner->m_hWnd,OBJID_CLIENT,IID_IAccessible,(void**)&m_pStdAccessible); CreateStdAccessibleObject(pOwner->m_hWnd,OBJID_CLIENT,IID_IAccessible,(void**)&m_pStdAccessible);
} }
CMenuAccessible::~CMenuAccessible( void ) CMenuAccessible::~CMenuAccessible( void ) = default;
{
}
void CMenuAccessible::Reset( void ) void CMenuAccessible::Reset( void )
{ {

View File

@@ -15,9 +15,7 @@ public:
m_RefCount=0; m_RefCount=0;
} }
~CDropTargetProxy( void ) ~CDropTargetProxy( void ) = default;
{
}
void Reset( void ) void Reset( void )
{ {

View File

@@ -36,7 +36,7 @@ public:
struct SearchCategory struct SearchCategory
{ {
SearchCategory( void ) {} SearchCategory( void ) = default;
SearchCategory( const SearchCategory &cat ) SearchCategory( const SearchCategory &cat )
{ {
search.Clone(cat.search); search.Clone(cat.search);

View File

@@ -3155,7 +3155,6 @@ LRESULT CCustomMenuDlg7::CItemList::OnSelEndOk( WORD wNotifyCode, WORD wID, HWND
if (m_Column==2) if (m_Column==2)
{ {
// state // state
CString str;
menuItem.settings&=~CEditMenuDlg7::SETTINGS_MASK; menuItem.settings&=~CEditMenuDlg7::SETTINGS_MASK;
if (sel==0) if (sel==0)
menuItem.settings|=StdMenuItem::MENU_ITEM_DISABLED; menuItem.settings|=StdMenuItem::MENU_ITEM_DISABLED;

View File

@@ -3760,7 +3760,6 @@ if (!g_bTrimHooks)
// context menu // context menu
if (msg->message==WM_NCRBUTTONUP || msg->message==WM_RBUTTONUP) if (msg->message==WM_NCRBUTTONUP || msg->message==WM_RBUTTONUP)
{ {
CPoint pt0(GetMessagePos());
TaskbarInfo *taskBar=FindTaskBarInfoButton(msg->hwnd); TaskbarInfo *taskBar=FindTaskBarInfoButton(msg->hwnd);
DWORD winVer=GetWinVersion(); DWORD winVer=GetWinVersion();
if (!taskBar && winVer>=WIN_VER_WIN8) if (!taskBar && winVer>=WIN_VER_WIN8)
@@ -3771,6 +3770,7 @@ if (!g_bTrimHooks)
} }
if (taskBar) if (taskBar)
{ {
CPoint pt0(GetMessagePos());
if (msg->message==WM_RBUTTONUP && msg->hwnd==taskBar->startButton && msg->lParam==MAKELPARAM(-1,-1)) if (msg->message==WM_RBUTTONUP && msg->hwnd==taskBar->startButton && msg->lParam==MAKELPARAM(-1,-1))
{ {
RECT rc; RECT rc;