mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-13 00:24:46 +08:00
style: added platform-dependent type aliases for char and string
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
@@ -75,7 +75,7 @@ std::filesystem::path find_resource_file(const std::filesystem::path &path) {
|
||||
return get_executable_directory() / path;
|
||||
}
|
||||
|
||||
std::string path_to_string(const std::filesystem::path &path) {
|
||||
std::string path_to_u8string(const std::filesystem::path &path) {
|
||||
#if _WIN32
|
||||
std::wstring wide_path = path.wstring();
|
||||
int buffer_size =
|
||||
@@ -92,3 +92,19 @@ std::string path_to_string(const std::filesystem::path &path) {
|
||||
return path.string();
|
||||
#endif
|
||||
}
|
||||
|
||||
StringType path_to_string_type(const std::filesystem::path &path) {
|
||||
#if _WIN32
|
||||
return path.wstring();
|
||||
#else
|
||||
return path.string();
|
||||
#endif
|
||||
}
|
||||
|
||||
StringType to_string_type(int value) {
|
||||
#if _WIN32
|
||||
return std::to_wstring(value);
|
||||
#else
|
||||
return std::to_string(value);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user