mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
Remove no longer used wstring_printf functions
This commit is contained in:
parent
fa2e125ec4
commit
4c81024ca2
@ -29,14 +29,6 @@ void string_printf(std::string& str, const char* format, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void wstring_printf(std::wstring& str, const wchar_t* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
wstring_vprintf(str, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
int str_to_port(const char *str)
|
||||
{
|
||||
long port;
|
||||
|
||||
@ -99,8 +99,6 @@ int str_to_port(const char *str);
|
||||
|
||||
void string_vprintf(std::string& str, const char* format, va_list ap);
|
||||
void string_printf(std::string& str, const char *format, ...);
|
||||
void wstring_vprintf(std::wstring& str, const wchar_t* format, va_list ap);
|
||||
void wstring_printf(std::wstring& str, const wchar_t *format, ...);
|
||||
|
||||
template<class T>
|
||||
class FreeObject {
|
||||
|
||||
@ -35,20 +35,6 @@ void string_vprintf(std::string& str, const char* format, va_list ap)
|
||||
}
|
||||
}
|
||||
|
||||
void wstring_vprintf(std::wstring& str, const wchar_t* format, va_list ap)
|
||||
{
|
||||
int buf_size = 256;
|
||||
for (;;) {
|
||||
AutoArray<wchar_t> buf(new wchar_t[buf_size]);
|
||||
int r = vswprintf(buf.get(), buf_size, format, ap);
|
||||
if (r != -1) {
|
||||
str = buf.get();
|
||||
return;
|
||||
}
|
||||
buf_size *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
HDC create_compatible_dc()
|
||||
{
|
||||
HDC dc = CreateCompatibleDC(NULL);
|
||||
|
||||
@ -28,21 +28,3 @@ void string_vprintf(std::string& str, const char* format, va_list ap)
|
||||
vsnprintf(buf.get(), len, format, ap);
|
||||
str = buf.get();
|
||||
}
|
||||
|
||||
void wstring_vprintf(std::wstring& str, const wchar_t* format, va_list ap)
|
||||
{
|
||||
int buf_size = 256;
|
||||
for (;;) {
|
||||
AutoArray<wchar_t> buf(new wchar_t[buf_size]);
|
||||
va_list ap_test;
|
||||
va_copy(ap_test, ap);
|
||||
int r = vswprintf(buf.get(), buf_size, format, ap_test);
|
||||
va_end(ap_test);
|
||||
if (r != -1) {
|
||||
str = buf.get();
|
||||
return;
|
||||
}
|
||||
buf_size *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user