diff options
author | Yuri Gorshenin <y@maps.me> | 2016-03-24 19:51:46 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-03-24 19:51:46 +0300 |
commit | d58231c575cff918b260a7ca6fed3ec27df10c68 (patch) | |
tree | 1aa0c9aee6fc76718ad1b2c796dd99c273c79658 /platform | |
parent | cacf42382da9f96013494b7e55f14c9c8ecfb2a3 (diff) |
[platform][build] Fixed build warning.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.cpp | 20 | ||||
-rw-r--r-- | platform/platform.hpp | 2 | ||||
-rw-r--r-- | platform/platform_unix_impl.cpp | 20 |
3 files changed, 22 insertions, 20 deletions
diff --git a/platform/platform.cpp b/platform/platform.cpp index 1a7e9dd9c8..339ff20b35 100644 --- a/platform/platform.cpp +++ b/platform/platform.cpp @@ -207,3 +207,23 @@ unsigned Platform::CpuCores() const unsigned const cores = thread::hardware_concurrency(); return cores > 0 ? cores : 1; } + +string DebugPrint(Platform::EError err) +{ + switch (err) + { + case Platform::ERR_OK: return "Ok"; + case Platform::ERR_FILE_DOES_NOT_EXIST: return "File does not exist."; + case Platform::ERR_ACCESS_FAILED: return "Access failed."; + case Platform::ERR_DIRECTORY_NOT_EMPTY: return "Directory not empty."; + case Platform::ERR_FILE_ALREADY_EXISTS: return "File already exists."; + case Platform::ERR_NAME_TOO_LONG: + return "The length of a component of path exceeds {NAME_MAX} characters."; + case Platform::ERR_NOT_A_DIRECTORY: + return "A component of the path prefix of Path is not a directory."; + case Platform::ERR_SYMLINK_LOOP: + return "Too many symbolic links were encountered in translating path."; + case Platform::ERR_IO_ERROR: return "An I/O error occurred."; + case Platform::ERR_UNKNOWN: return "Unknown"; + } +} diff --git a/platform/platform.hpp b/platform/platform.hpp index a909d76754..45770be135 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -227,3 +227,5 @@ private: }; extern Platform & GetPlatform(); + +string DebugPrint(Platform::EError err); diff --git a/platform/platform_unix_impl.cpp b/platform/platform_unix_impl.cpp index f88e662607..1336022c0f 100644 --- a/platform/platform_unix_impl.cpp +++ b/platform/platform_unix_impl.cpp @@ -32,26 +32,6 @@ struct CloseDir closedir(dir); } }; - -string DebugPrint(Platform::EError err) -{ - switch (err) - { - case Platform::ERR_OK: return "Ok"; - case Platform::ERR_FILE_DOES_NOT_EXIST: return "File does not exist."; - case Platform::ERR_ACCESS_FAILED: return "Access failed."; - case Platform::ERR_DIRECTORY_NOT_EMPTY: return "Directory not empty."; - case Platform::ERR_FILE_ALREADY_EXISTS: return "File already exists."; - case Platform::ERR_NAME_TOO_LONG: - return "The length of a component of path exceeds {NAME_MAX} characters."; - case Platform::ERR_NOT_A_DIRECTORY: - return "A component of the path prefix of Path is not a directory."; - case Platform::ERR_SYMLINK_LOOP: - return "Too many symbolic links were encountered in translating path."; - case Platform::ERR_IO_ERROR: return "An I/O error occurred."; - case Platform::ERR_UNKNOWN: return "Unknown"; - } -} } // namespace void Platform::GetSystemFontNames(FilesList & res) const |