fix: use new method to do the convertion among UTF8, UTF16 and UTF32.

- use std::codevct as the convertion method among UTF8, UTF16 and UTF32.
- fix the issue that COM Guard was accidently dropped by compiler because no reference to it.
This commit is contained in:
2024-06-20 10:16:13 +08:00
parent 1fd132f0c9
commit 3fa05b43d9
5 changed files with 97 additions and 87 deletions

View File

@ -21,6 +21,10 @@ namespace YYCC::COMHelper {
}
}
bool IsInitialized() const {
return m_HasInit;
}
protected:
bool m_HasInit;
};
@ -33,7 +37,11 @@ namespace YYCC::COMHelper {
* So we use a static instance in here.
* And make it be const so no one can change it.
*/
static const ComGuard c_ComGuard;
static const ComGuard c_ComGuard {};
bool IsInitialized() {
return c_ComGuard.IsInitialized();
}
}