mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-10 05:36:22 +08:00
Removed use of mbrtowc, wcrtomb, and mbsinit. Many platforms
didn't support them and the emulated versions were just as good except for a performance problem with excessive locking and unlocking of a mutex. So this also changes IArchString to provide string rather than character conversion so we can lock the mutex once per string rather than once per character.
This commit is contained in:
@@ -18,22 +18,11 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "CMultibyte.cpp"
|
||||
|
||||
//
|
||||
// CArchStringWindows
|
||||
//
|
||||
|
||||
CArchStringWindows::CArchStringWindows()
|
||||
{
|
||||
initMB();
|
||||
}
|
||||
|
||||
CArchStringWindows::~CArchStringWindows()
|
||||
{
|
||||
cleanMB();
|
||||
}
|
||||
|
||||
#include "CMultibyte.cpp"
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define ARCH_VSNPRINTF _vsnprintf
|
||||
#include "vsnprintf.cpp"
|
||||
|
||||
Reference in New Issue
Block a user