From c0ff37c30da931bd1ea203aba1e8dc8a05ea1bf1 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Sat, 1 Oct 2016 14:53:32 -0400 Subject: Adding new string conversion overloads [a|w|t|utf8]_from_[a|w|t|utf8_]string(xyz.c_str()) seems to be common enough to justify overloads. Also, I'm explicitly assuming that it is legal to override the NUL pointer within a C++ basic_string (e.g. - s[s.size()] = '\0'). As far as I can tell, this seems to be legal - please don't shoot if I am wrong. --- src/osd/modules/file/windir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/osd/modules/file/windir.cpp') diff --git a/src/osd/modules/file/windir.cpp b/src/osd/modules/file/windir.cpp index 522e0e297a1..f50907ff117 100644 --- a/src/osd/modules/file/windir.cpp +++ b/src/osd/modules/file/windir.cpp @@ -112,7 +112,7 @@ bool win_directory::open_impl(std::string const &dirname) std::string dirfilter = string_format("%s\\*.*", dirname); // convert the path to TCHARs - auto t_dirfilter = tstring_from_utf8(dirfilter.c_str()); + tstring t_dirfilter = tstring_from_utf8(dirfilter); // attempt to find the first file m_find = FindFirstFileEx(t_dirfilter.c_str(), FindExInfoStandard, &m_data, FindExSearchNameMatch, nullptr, 0); -- cgit v1.2.3-70-g09d2