Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 committed 2010-04-25 00:31:27 +00:00
1 parent 790cd55608
commit 4457fe40fc
1267 files changed
+17269 -17269

No files matched your search

+40 -40
View File
@@ -42,7 +42,7 @@ void TiXmlBase::PutString( const TIXML_STRING& str, TIXML_STRING* outString )
{
unsigned char c = (unsigned char) str[i];
if ( c == '&'
if ( c == '&'
&& i < ( (int)str.length() - 2 )
&& str[i+1] == '#'
&& str[i+2] == 'x' )
@@ -95,12 +95,12 @@ void TiXmlBase::PutString( const TIXML_STRING& str, TIXML_STRING* outString )
// Easy pass at non-alpha/numeric/symbol
// Below 32 is symbolic.
char buf[ 32 ];
#if defined(TIXML_SNPRINTF)
#if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
#else
sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
#endif
#endif
//*ME: warning C4267: convert 'size_t' to 'int'
//*ME: Int-Cast to make compiler happy ...
@@ -139,14 +139,14 @@ TiXmlNode::~TiXmlNode()
temp = node;
node = node->next;
delete temp;
}
}
}
void TiXmlNode::CopyTo( TiXmlNode* target ) const
{
target->SetValue (value.c_str() );
target->userData = userData;
target->userData = userData;
}
@@ -160,7 +160,7 @@ void TiXmlNode::Clear()
temp = node;
node = node->next;
delete temp;
}
}
firstChild = 0;
lastChild = 0;
@@ -210,7 +210,7 @@ TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )
{
{
if ( !beforeThis || beforeThis->parent != this ) {
return 0;
}
@@ -304,7 +304,7 @@ TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& wit
bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )
{
if ( removeThis->parent != this )
{
{
assert( 0 );
return false;
}
@@ -375,7 +375,7 @@ const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode*
}
const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
{
const TiXmlNode* node;
for ( node = next; node; node = node->next )
@@ -496,7 +496,7 @@ TiXmlElement::TiXmlElement (const char * _value)
#ifdef TIXML_USE_STL
TiXmlElement::TiXmlElement( const std::string& _value )
TiXmlElement::TiXmlElement( const std::string& _value )
: TiXmlNode( TiXmlNode::ELEMENT )
{
firstChild = lastChild = 0;
@@ -509,7 +509,7 @@ TiXmlElement::TiXmlElement( const TiXmlElement& copy)
: TiXmlNode( TiXmlNode::ELEMENT )
{
firstChild = lastChild = 0;
copy.CopyTo( this );
copy.CopyTo( this );
}
@@ -667,9 +667,9 @@ int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval )
void TiXmlElement::SetAttribute( const char * name, int val )
{
{
char buf[64];
#if defined(TIXML_SNPRINTF)
#if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF( buf, sizeof(buf), "%d", val );
#else
sprintf( buf, "%d", val );
@@ -680,7 +680,7 @@ void TiXmlElement::SetAttribute( const char * name, int val )
#ifdef TIXML_USE_STL
void TiXmlElement::SetAttribute( const std::string& name, int val )
{
{
std::ostringstream oss;
oss << val;
SetAttribute( name, oss.str() );
@@ -689,9 +689,9 @@ void TiXmlElement::SetAttribute( const std::string& name, int val )
void TiXmlElement::SetDoubleAttribute( const char * name, double val )
{
{
char buf[256];
#if defined(TIXML_SNPRINTF)
#if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
#else
sprintf( buf, "%f", val );
@@ -812,7 +812,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
// superclass:
TiXmlNode::CopyTo( target );
// Element class:
// Element class:
// Clone the attributes, then clone the children.
const TiXmlAttribute* attribute = 0;
for( attribute = attributeSet.First();
@@ -831,7 +831,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const
{
if ( visitor->VisitEnter( *this, attributeSet.First() ) )
if ( visitor->VisitEnter( *this, attributeSet.First() ) )
{
for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
{
@@ -941,7 +941,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
value = filename;
// reading in binary mode so that tinyxml can normalize the EOL
FILE* file = fopen( value.c_str (), "rb" );
FILE* file = fopen( value.c_str (), "rb" );
if ( file )
{
@@ -958,7 +958,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
{
if ( !file )
if ( !file )
{
SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
return false;
@@ -990,13 +990,13 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
// 2.11 End-of-Line Handling
// <snip>
// <quote>
// ...the XML processor MUST behave as if it normalized all line breaks in external
// parsed entities (including the document entity) on input, before parsing, by translating
// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
// ...the XML processor MUST behave as if it normalized all line breaks in external
// parsed entities (including the document entity) on input, before parsing, by translating
// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
// a single #xA character.
// </quote>
//
// It is not clear fgets does that, and certainly isn't clear it works cross platform.
// It is not clear fgets does that, and certainly isn't clear it works cross platform.
// Generally, you expect fgets to translate from the convention of the OS to the c/unix
// convention, and not work generally.
@@ -1058,7 +1058,7 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
// Handle any left over characters.
if ( p-lastPos ) {
data.append( lastPos, p-lastPos );
}
}
delete [] buf;
buf = 0;
@@ -1087,7 +1087,7 @@ bool TiXmlDocument::SaveFile( const char * filename ) const
bool TiXmlDocument::SaveFile( FILE* fp ) const
{
if ( useMicrosoftBOM )
if ( useMicrosoftBOM )
{
const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
@@ -1113,7 +1113,7 @@ void TiXmlDocument::CopyTo( TiXmlDocument* target ) const
for ( node = firstChild; node; node = node->NextSibling() )
{
target->LinkEndChild( node->Clone() );
}
}
}
@@ -1236,7 +1236,7 @@ int TiXmlAttribute::QueryDoubleValue( double* dval ) const
void TiXmlAttribute::SetIntValue( int _value )
{
char buf [64];
#if defined(TIXML_SNPRINTF)
#if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
#else
sprintf (buf, "%d", _value);
@@ -1247,7 +1247,7 @@ void TiXmlAttribute::SetIntValue( int _value )
void TiXmlAttribute::SetDoubleValue( double _value )
{
char buf [256];
#if defined(TIXML_SNPRINTF)
#if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value);
#else
sprintf (buf, "%lf", _value);
@@ -1349,7 +1349,7 @@ bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
TiXmlNode* TiXmlText::Clone() const
{
{
TiXmlText* clone = 0;
clone = new TiXmlText( "" );
@@ -1388,7 +1388,7 @@ TiXmlDeclaration::TiXmlDeclaration( const std::string& _version,
TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )
: TiXmlNode( TiXmlNode::DECLARATION )
{
copy.CopyTo( this );
copy.CopyTo( this );
}
@@ -1438,7 +1438,7 @@ bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const
TiXmlNode* TiXmlDeclaration::Clone() const
{
{
TiXmlDeclaration* clone = new TiXmlDeclaration();
if ( !clone )
@@ -1576,7 +1576,7 @@ TiXmlAttribute* TiXmlAttributeSet::Find( const char* name )
}
*/
#ifdef TIXML_USE_STL
#ifdef TIXML_USE_STL
std::istream& operator>> (std::istream & in, TiXmlNode & base)
{
TIXML_STRING tag;
@@ -1589,7 +1589,7 @@ std::istream& operator>> (std::istream & in, TiXmlNode & base)
#endif
#ifdef TIXML_USE_STL
#ifdef TIXML_USE_STL
std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)
{
TiXmlPrinter printer;
@@ -1759,12 +1759,12 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
attrib->Print( 0, 0, &buffer );
}
if ( !element.FirstChild() )
if ( !element.FirstChild() )
{
buffer += " />";
DoLineBreak();
}
else
else
{
buffer += ">";
if ( element.FirstChild()->ToText()
@@ -1779,7 +1779,7 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
DoLineBreak();
}
}
++depth;
++depth;
return true;
}
@@ -1787,11 +1787,11 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
bool TiXmlPrinter::VisitExit( const TiXmlElement& element )
{
--depth;
if ( !element.FirstChild() )
if ( !element.FirstChild() )
{
// nothing.
}
else
else
{
if ( simpleTextPrint )
{