mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[MSPAINT] Use Swap in RegistrySettings::SetMostRecentFile
CORE-19237
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user