[Project64] moved stdwstr_f::stdwstr_f out of .h and in to .cpp
This commit is contained in:
parent
d6b8fe523e
commit
8580a1d5ce
|
@ -1,8 +1,6 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "StdString.h"
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
stdstr::stdstr()
|
stdstr::stdstr()
|
||||||
{
|
{
|
||||||
|
@ -251,9 +249,24 @@ std::wstring stdstr::ToUTF16(unsigned int CodePage, bool * bSuccess)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
stdstr_f::stdstr_f(const char * strFormat, ...)
|
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_list args;
|
||||||
va_start(args, strFormat);
|
va_start(args, strFormat);
|
||||||
ArgFormat(strFormat,args);
|
|
||||||
|
wchar_t Msg[1000];
|
||||||
|
_vsnwprintf(Msg, sizeof(Msg) - 1, strFormat, args);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
|
this->assign(Msg);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -52,22 +52,13 @@ public:
|
||||||
stdstr_f(const char * strFormat, ...);
|
stdstr_f(const char * strFormat, ...);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
class stdwstr_f : public std::wstring
|
class stdwstr_f : public std::wstring
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
stdwstr_f(const wchar_t * strFormat, ...)
|
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);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef std::list<stdstr> strlist;
|
typedef std::list<stdstr> strlist;
|
||||||
typedef strlist::iterator strlist_iter;
|
typedef strlist::iterator strlist_iter;
|
||||||
|
|
Loading…
Reference in New Issue