[Project64] moved stdwstr_f::stdwstr_f out of .h and in to .cpp

This commit is contained in:
zilmar 2016-01-13 06:01:13 +11:00
parent d6b8fe523e
commit 8580a1d5ce
2 changed files with 20 additions and 16 deletions

View File

@ -1,8 +1,6 @@
#include "stdafx.h"
#include <malloc.h>
#include <algorithm>
#include "StdString.h"
#include <windows.h>
stdstr::stdstr()
{
@ -251,9 +249,24 @@ std::wstring stdstr::ToUTF16(unsigned int CodePage, bool * bSuccess)
#endif
stdstr_f::stdstr_f(const char * strFormat, ...)
{
{
va_list args;
va_start(args, strFormat);
ArgFormat(strFormat, args);
va_end(args);
}
#ifdef _WIN32
stdwstr_f::stdwstr_f(const wchar_t * strFormat, ...)
{
va_list args;
va_start(args, strFormat);
ArgFormat(strFormat,args);
wchar_t Msg[1000];
_vsnwprintf(Msg, sizeof(Msg) - 1, strFormat, args);
va_end(args);
this->assign(Msg);
}
#endif

View File

@ -52,22 +52,13 @@ public:
stdstr_f(const char * strFormat, ...);
};
#ifdef _WIN32
class stdwstr_f : public std::wstring
{
public:
stdwstr_f(const wchar_t * strFormat, ...)
{
va_list args;
va_start(args, strFormat);
wchar_t Msg[1000];
_vsnwprintf(Msg, sizeof(Msg) - 1, strFormat, args);
va_end(args);
this->assign(Msg);
}
stdwstr_f(const wchar_t * strFormat, ... );
};
#endif
typedef std::list<stdstr> strlist;
typedef strlist::iterator strlist_iter;