From: <sv...@op...> - 2025-03-12 18:05:22
|
Author: manx Date: Wed Mar 12 19:05:14 2025 New Revision: 23022 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23022 Log: [Ref] mptPathString: Small step towards header-only. Modified: trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h Modified: trunk/OpenMPT/common/mptPathString.cpp ============================================================================== --- trunk/OpenMPT/common/mptPathString.cpp Mon Mar 10 15:46:30 2025 (r23021) +++ trunk/OpenMPT/common/mptPathString.cpp Wed Mar 12 19:05:14 2025 (r23022) @@ -16,10 +16,6 @@ #include <tchar.h> #endif -#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS -#include <windows.h> -#endif - OPENMPT_NAMESPACE_BEGIN @@ -33,17 +29,6 @@ -#if !MPT_OS_WINDOWS_WINRT - -int PathCompareNoCase(const PathString & a, const PathString & b) -{ - return lstrcmpi(a.AsNative().c_str(), b.AsNative().c_str()); -} - -#endif // !MPT_OS_WINDOWS_WINRT - - - // Convert an absolute path to a path that's relative to "&relativeTo". mpt::PathString AbsolutePathToRelative(const mpt::PathString &path, const mpt::PathString &relativeTo) { Modified: trunk/OpenMPT/common/mptPathString.h ============================================================================== --- trunk/OpenMPT/common/mptPathString.h Mon Mar 10 15:46:30 2025 (r23021) +++ trunk/OpenMPT/common/mptPathString.h Wed Mar 12 19:05:14 2025 (r23022) @@ -25,6 +25,10 @@ #include "mptString.h" +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS +#include <windows.h> +#endif + OPENMPT_NAMESPACE_BEGIN @@ -92,7 +96,10 @@ #if !MPT_OS_WINDOWS_WINRT -int PathCompareNoCase(const PathString &a, const PathString &b); +inline int PathCompareNoCase(const PathString &a, const PathString &b) +{ + return lstrcmpi(a.AsNative().c_str(), b.AsNative().c_str()); +} #endif // !MPT_OS_WINDOWS_WINRT |