зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1836989 - Rename the hacky string conversion function in ipc/glue/StringUtil.cpp. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D180095
This commit is contained in:
Родитель
48e6d2d2ae
Коммит
6869dc0a66
|
@ -31,7 +31,7 @@ namespace base {
|
|||
|
||||
// FIXME/cjones: as its name implies, this function is a hack.
|
||||
template <typename FromType, typename ToType>
|
||||
ToType GhettoStringConvert(const FromType& in) {
|
||||
ToType HackyStringConvert(const FromType& in) {
|
||||
// FIXME/cjones: assumes no non-ASCII characters in |in|
|
||||
ToType out;
|
||||
out.resize(in.length());
|
||||
|
@ -62,14 +62,14 @@ namespace base {
|
|||
#if !defined(XP_DARWIN) && !defined(XP_WIN)
|
||||
std::string SysWideToUTF8(const std::wstring& wide) {
|
||||
// FIXME/cjones: do this with iconv
|
||||
return GhettoStringConvert<std::wstring, std::string>(wide);
|
||||
return HackyStringConvert<std::wstring, std::string>(wide);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(XP_DARWIN) && !defined(XP_WIN)
|
||||
std::wstring SysUTF8ToWide(const StringPiece& utf8) {
|
||||
// FIXME/cjones: do this with iconv
|
||||
return GhettoStringConvert<StringPiece, std::wstring>(utf8);
|
||||
return HackyStringConvert<StringPiece, std::wstring>(utf8);
|
||||
}
|
||||
|
||||
std::string SysWideToNativeMB(const std::wstring& wide) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче