mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-05-14 11:21:38 +00:00
Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6.
When we include c++ headers, we have to use explicit std::
This commit is contained in:
parent
a94fc98396
commit
f59e2d6a89
@ -24,7 +24,7 @@ distribution.
|
|||||||
#include "tinyxml2.h"
|
#include "tinyxml2.h"
|
||||||
|
|
||||||
#include <new> // yes, this one new style header, is in the Android SDK.
|
#include <new> // yes, this one new style header, is in the Android SDK.
|
||||||
# ifdef ANDROID_NDK
|
#if defined(ANDROID_NDK) || defined(__QNXNTO__)
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
#else
|
#else
|
||||||
# include <cstddef>
|
# include <cstddef>
|
||||||
|
@ -24,7 +24,7 @@ distribution.
|
|||||||
#ifndef TINYXML2_INCLUDED
|
#ifndef TINYXML2_INCLUDED
|
||||||
#define TINYXML2_INCLUDED
|
#define TINYXML2_INCLUDED
|
||||||
|
|
||||||
#if defined(ANDROID_NDK) || defined(__BORLANDC__)
|
#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
10
xmltest.cpp
10
xmltest.cpp
@ -296,12 +296,12 @@ int main( int argc, const char ** argv )
|
|||||||
|
|
||||||
if ( argc > 1 ) {
|
if ( argc > 1 ) {
|
||||||
XMLDocument* doc = new XMLDocument();
|
XMLDocument* doc = new XMLDocument();
|
||||||
clock_t startTime = clock();
|
clock_t startTime = std::clock();
|
||||||
doc->LoadFile( argv[1] );
|
doc->LoadFile( argv[1] );
|
||||||
clock_t loadTime = clock();
|
clock_t loadTime = std::clock();
|
||||||
int errorID = doc->ErrorID();
|
int errorID = doc->ErrorID();
|
||||||
delete doc; doc = 0;
|
delete doc; doc = 0;
|
||||||
clock_t deleteTime = clock();
|
clock_t deleteTime = std::clock();
|
||||||
|
|
||||||
printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID );
|
printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID );
|
||||||
if ( !errorID ) {
|
if ( !errorID ) {
|
||||||
@ -1403,7 +1403,7 @@ int main( int argc, const char ** argv )
|
|||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
QueryPerformanceCounter( (LARGE_INTEGER*) &start );
|
QueryPerformanceCounter( (LARGE_INTEGER*) &start );
|
||||||
#else
|
#else
|
||||||
clock_t cstart = clock();
|
clock_t cstart = std::clock();
|
||||||
#endif
|
#endif
|
||||||
static const int COUNT = 10;
|
static const int COUNT = 10;
|
||||||
for( int i=0; i<COUNT; ++i ) {
|
for( int i=0; i<COUNT; ++i ) {
|
||||||
@ -1413,7 +1413,7 @@ int main( int argc, const char ** argv )
|
|||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
QueryPerformanceCounter( (LARGE_INTEGER*) &end );
|
QueryPerformanceCounter( (LARGE_INTEGER*) &end );
|
||||||
#else
|
#else
|
||||||
clock_t cend = clock();
|
clock_t cend = std::clock();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete [] mem;
|
delete [] mem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user