summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_filespec.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-26 16:24:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-27 01:04:13 +0000
commit698aed79d6ad6e8e3a0c7a500c108d69f944b82d (patch)
treefbf7e66e0a2ec096561cd0ba5d3c4d577cd64667 /core/fpdfdoc/cpdf_filespec.cpp
parent3070e94f608f36e7312fad2d471e3d7546f82ca2 (diff)
downloadpdfium-698aed79d6ad6e8e3a0c7a500c108d69f944b82d.tar.xz
Cleanup FX macros
This CL renames the FX_OS defines to have _OS_ in their names and drops the _DESKTOP suffix. The FXM defines have been changed to just FX. Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74 Reviewed-on: https://pdfium-review.googlesource.com/14833 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_filespec.cpp')
-rw-r--r--core/fpdfdoc/cpdf_filespec.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp
index 803c4148c7..2f999bcf4e 100644
--- a/core/fpdfdoc/cpdf_filespec.cpp
+++ b/core/fpdfdoc/cpdf_filespec.cpp
@@ -18,13 +18,13 @@
namespace {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
WideString ChangeSlashToPlatform(const wchar_t* str) {
WideString result;
while (*str) {
if (*str == '/') {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
result += L':';
#else
result += L'\\';
@@ -49,7 +49,7 @@ WideString ChangeSlashToPDF(const wchar_t* str) {
}
return result;
}
-#endif // _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_APPLE_ || _FX_PLATFORM_WINDOWS_
} // namespace
@@ -63,11 +63,11 @@ WideString CPDF_FileSpec::DecodeFileName(const WideString& filepath) {
if (filepath.GetLength() <= 1)
return WideString();
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (filepath.Left(sizeof("/Mac") - 1) == WideStringView(L"/Mac"))
return ChangeSlashToPlatform(filepath.c_str() + 1);
return ChangeSlashToPlatform(filepath.c_str());
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (filepath[0] != L'/')
return ChangeSlashToPlatform(filepath.c_str());
@@ -157,7 +157,7 @@ WideString CPDF_FileSpec::EncodeFileName(const WideString& filepath) {
if (filepath.GetLength() <= 1)
return WideString();
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (filepath[1] == L':') {
WideString result(L'/');
result += filepath[0];
@@ -173,7 +173,7 @@ WideString CPDF_FileSpec::EncodeFileName(const WideString& filepath) {
if (filepath[0] == L'\\')
return L'/' + ChangeSlashToPDF(filepath.c_str());
return ChangeSlashToPDF(filepath.c_str());
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (filepath.Left(sizeof("Mac") - 1) == L"Mac")
return L'/' + ChangeSlashToPDF(filepath.c_str());
return ChangeSlashToPDF(filepath.c_str());