mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 12:41:06 +08:00
tests: Fix MSVC 2005 build
... I forgot we still support platforms without C99, 23 years later.
This commit is contained in:
parent
ab8453c572
commit
3b5c1fb022
@ -736,7 +736,12 @@ struct temp_file
|
||||
temp_file()
|
||||
{
|
||||
static int index = 0;
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
snprintf(path, sizeof(path), "%stempfile%d", test_runner::_temp_path, index++);
|
||||
#else
|
||||
sprintf(path, "%stempfile%d", test_runner::_temp_path, index++);
|
||||
#endif
|
||||
}
|
||||
|
||||
~temp_file()
|
||||
|
@ -795,7 +795,12 @@ struct test_walker: xml_tree_walker
|
||||
std::basic_string<char_t> depthstr() const
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
snprintf(buf, sizeof(buf), "%d", depth());
|
||||
#else
|
||||
sprintf(buf, "%d", depth());
|
||||
#endif
|
||||
|
||||
#ifdef PUGIXML_WCHAR_MODE
|
||||
wchar_t wbuf[32];
|
||||
|
Loading…
x
Reference in New Issue
Block a user