mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-28 03:10:34 +08:00
style: added platform-dependent type aliases for char and string
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
22
include/libvideo2x/char_defs.h
Normal file
22
include/libvideo2x/char_defs.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CHAR_DEFS_H
|
||||
#define CHAR_DEFS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef wchar_t CharType;
|
||||
#define STR(x) L##x
|
||||
#else
|
||||
typedef char CharType;
|
||||
#define STR(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef std::wstring StringType;
|
||||
#else
|
||||
typedef std::string StringType;
|
||||
#endif
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // CHAR_DEFS_H
|
||||
Reference in New Issue
Block a user