mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[MSPAINT] Use Swap in RegistrySettings::SetMostRecentFile
CORE-19237
This commit is contained in:
parent
7c0615fa05
commit
a58aee5f5b
|
@ -51,7 +51,7 @@ BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName);
|
|||
#define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI))
|
||||
|
||||
template <typename T>
|
||||
void Swap(T& a, T& b)
|
||||
inline void Swap(T& a, T& b)
|
||||
{
|
||||
T tmp = a;
|
||||
a = b;
|
||||
|
|
|
@ -264,11 +264,7 @@ void RegistrySettings::SetMostRecentFile(LPCWSTR szPathName)
|
|||
iFound = i;
|
||||
|
||||
if (iFound >= 0)
|
||||
{
|
||||
CStringW tmp = strFiles[i];
|
||||
strFiles[i] = strFiles[i - 1];
|
||||
strFiles[i - 1] = tmp;
|
||||
}
|
||||
Swap(strFiles[i], strFiles[i - 1]);
|
||||
}
|
||||
|
||||
// If szPathName is not the first item in strFiles, insert it at the top of the list
|
||||
|
|
Loading…
Reference in a new issue