This commit is contained in:
Nomango 2019-02-01 23:12:57 +08:00 committed by Nomango
parent 5957e75924
commit cbb4b4b318
3 changed files with 10 additions and 11 deletions

View File

@ -30,7 +30,7 @@ namespace easy2d
public:
explicit Loop(
ActionPtr const& action, /* 执行循环的动作 */
int times = -1 /* 循环次数 */
int times = -1 /* 循环次数 */
);
virtual ~Loop();

View File

@ -40,14 +40,14 @@ namespace easy2d
public:
explicit Task(
Callback const& func, /* 执行函数 */
Callback const& func, /* 执行函数 */
String const& name = L"" /* ÈÎÎñÃû³Æ */
);
explicit Task(
Callback const& func, /* 执行函数 */
Duration delay, /* 时间间隔(秒) */
int times = -1, /* 执行次数(设 -1 为永久执行) */
Callback const& func, /* 执行函数 */
Duration delay, /* 时间间隔(秒) */
int times = -1, /* 执行次数(设 -1 为永久执行) */
String const& name = L"" /* ÈÎÎñÃû³Æ */
);

View File

@ -100,15 +100,16 @@ namespace easy2d
if (!enabled)
return;
static wchar_t temp_buffer[1024 * 3 + 1];
size_t len = ::_vscwprintf(format, args) + 1;
wchar_t* buffer = new wchar_t[len];
::_vsnwprintf_s(buffer, len, len, format, args);
::_vsnwprintf_s(temp_buffer, len, len, format, args);
std::wstringstream ss;
if (prompt)
ss << OutPrefix << prompt << buffer;
ss << OutPrefix << prompt << temp_buffer;
else
ss << OutPrefix << buffer;
ss << OutPrefix << temp_buffer;
if (endl)
ss << L"\r\n";
@ -116,8 +117,6 @@ namespace easy2d
std::wstring output = ss.str();
os << color << output;
::OutputDebugStringW(output.c_str());
delete[] buffer;
}
}