mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
clang-tidy: use data() (#1129)
Found with readability-container-data-pointer Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
47c4e0859c
commit
54f84cc924
@ -47,9 +47,9 @@ namespace
|
||||
const int len = WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, nullptr, 0, nullptr, nullptr);
|
||||
if(len != 0) {
|
||||
std::vector<char> buf(len);
|
||||
WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, &buf[0], len, nullptr, nullptr);
|
||||
WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, buf.data(), len, nullptr, nullptr);
|
||||
|
||||
std::cerr << std::string(&buf[0]);
|
||||
std::cerr << std::string(buf.begin(), buf.end());
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -43,7 +43,7 @@ namespace
|
||||
return std::wstring();
|
||||
|
||||
std::wstring wstr(len - 1, L'\0');
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, &wstr[0], len);
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, wstr.data(), len);
|
||||
|
||||
return wstr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user