@@ 14,16 14,12 @@ FilePath::FilePath(const std::wstring &path)
filename(MAX_PATH, L'\0'),
extension(MAX_PATH, L'\0')
{
- _wsplitpath_s(
+ _wsplitpath(
path.c_str(),
drive.data(),
- drive.length() * sizeof(wchar_t),
directory.data(),
- directory.length() * sizeof(wchar_t),
filename.data(),
- filename.length() * sizeof(wchar_t),
- extension.data(),
- extension.length() * sizeof(wchar_t)
+ extension.data()
);
drive.resize(wcslen(drive.c_str()));
@@ 35,9 31,8 @@ FilePath::FilePath(const std::wstring &path)
std::wstring FilePath::path() const
{
std::wstring path(MAX_PATH, L'\0');
- _wmakepath_s(
+ _wmakepath(
path.data(),
- path.length() * sizeof(wchar_t),
drive.c_str(),
directory.c_str(),
filename.c_str(),