Removing some unnecessary calls to c_str(), and added str2wcstring(std::string) in common.cpp.

This commit is contained in:
Siteshwar Vashisht
2012-02-18 23:28:54 +05:30
parent c9f4e91df8
commit 7b3d670e23
7 changed files with 18 additions and 10 deletions

View File

@@ -239,6 +239,14 @@ wcstring str2wcstring( const char *in )
return result;
}
wcstring str2wcstring( const std::string &in )
{
wchar_t *tmp = str2wcs(in.c_str());
wcstring result = tmp;
free(tmp);
return result;
}
wchar_t *str2wcs_internal( const char *in, wchar_t *out )
{
size_t res=0;