MCPcopy Create free account
hub / github.com/baldurk/renderdoc / conv

Function conv

renderdoccmd/renderdoccmd_win32.cpp:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#include <tlhelp32.h>
39
40static std::string conv(const std::wstring &str)
41{
42 std::string ret;
43 // worst case each char takes 4 bytes to encode
44 ret.resize(str.size() * 4 + 1);
45
46 WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, &ret[0], (int)ret.size(), NULL, NULL);
47
48 ret.resize(strlen(ret.c_str()));
49
50 return ret;
51}
52
53static std::wstring conv(const std::string &str)
54{

Callers 5

ParseMethod · 0.70
ParseMethod · 0.70
ExecuteMethod · 0.70
ParseMethod · 0.70
mainFunction · 0.70

Calls 3

resizeMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected