mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-21 03:04:36 +10:00
Replace 'push*' -> 'emplace*' if possible and use std::move()
This commit is contained in:
@@ -405,7 +405,7 @@ LRESULT CLanguageSettingsDlg::OnSelChange( int idCtrl, LPNMHDR pnmh, BOOL& bHand
|
||||
CComVariant val(name);
|
||||
if (m_pSetting->value!=val)
|
||||
SetSettingsDirty();
|
||||
m_pSetting->value=val;
|
||||
m_pSetting->value=std::move(val);
|
||||
|
||||
if (_wcsicmp(m_pSetting->value.bstrVal,m_pSetting->defValue.bstrVal)==0)
|
||||
m_pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
|
||||
@@ -789,7 +789,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
}
|
||||
CComPtr<IXMLDOMNode> next;
|
||||
child2->get_nextSibling(&next);
|
||||
child2=next;
|
||||
child2=std::move(next);
|
||||
}
|
||||
string.push_back(0);
|
||||
pSetting->value=CComVariant(&string[0]);
|
||||
@@ -839,7 +839,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
CComPtr<IXMLDOMNode> next;
|
||||
if (child->get_nextSibling(&next)!=S_OK)
|
||||
break;
|
||||
child=next;
|
||||
child=std::move(next);
|
||||
}
|
||||
if (ver<0x03090000)
|
||||
UpgradeSettings(false);
|
||||
|
||||
@@ -1156,7 +1156,7 @@ HRESULT STDMETHODCALLTYPE CBrowseLinkEvents::OnButtonClicked( IFileDialogCustomi
|
||||
{
|
||||
pfd->GetFolder(&pItem);
|
||||
}
|
||||
m_pResult=pItem;
|
||||
m_pResult=std::move(pItem);
|
||||
pfd->Close(S_FALSE);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user