diff --git a/base/applications/mspaint/common.h b/base/applications/mspaint/common.h index e15297e115b..7f640110806 100644 --- a/base/applications/mspaint/common.h +++ b/base/applications/mspaint/common.h @@ -51,7 +51,7 @@ BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName); #define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI)) template -void Swap(T& a, T& b) +inline void Swap(T& a, T& b) { T tmp = a; a = b; diff --git a/base/applications/mspaint/registry.cpp b/base/applications/mspaint/registry.cpp index 68c54f5201c..6302555c41b 100644 --- a/base/applications/mspaint/registry.cpp +++ b/base/applications/mspaint/registry.cpp @@ -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