Browse Source

Normalize source code

Add .gitattributes
Remove trailing whitespaces
Eduardo Bart 7 years ago
parent
commit
d85dd3e20f

+ 6
- 0
.gitattributes View File

@@ -0,0 +1,6 @@
1
+# Normalize source code before commits
2
+*.lua eol=lf 
3
+*.txt eol=lf 
4
+*.ot* eol=lf 
5
+*.cpp eol=lf 
6
+*.h   eol=lf 

+ 2
- 2
modules/client_options/options.lua View File

@@ -74,7 +74,7 @@ function Options.init()
74 74
   optionsWindow = g_ui.displayUI('options.otui')
75 75
   optionsWindow:hide()
76 76
   optionsButton = TopMenu.addLeftButton('optionsButton', tr('Options') .. ' (Ctrl+D)', 'options.png', Options.toggle)
77
-  
77
+
78 78
   optionsTabBar = optionsWindow:getChildById('optionsTabBar')
79 79
   optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))
80 80
 
@@ -146,7 +146,7 @@ function Options.setOption(key, value)
146 146
       value = 0
147 147
     end
148 148
 
149
-    if graphicsPanel then 
149
+    if graphicsPanel then
150 150
 	  graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
151 151
 	end
152 152
     g_app.setBackgroundPaneMaxFps(value)

+ 1
- 1
modules/client_skins/skins/default/styles/tables.otui View File

@@ -4,7 +4,7 @@ Table < UITable
4 4
   header-row-style: HeaderTableRow
5 5
   column-style: TableColumn
6 6
   row-style: TableRow
7
-  
7
+
8 8
 TableData < UIScrollArea
9 9
   layout: verticalBox
10 10
 

+ 1
- 1
modules/client_topmenu/topmenu.lua View File

@@ -84,7 +84,7 @@ end
84 84
 function TopMenu.addRightGameButton(id, description, icon, callback)
85 85
   return addButton(id, description, icon, callback, rightGameButtonsPanel, false)
86 86
 end
87
- 
87
+
88 88
 function TopMenu.addRightGameToggleButton(id, description, icon, callback, right)
89 89
   return addButton(id, description, icon, callback, rightGameButtonsPanel, true)
90 90
 end

+ 1
- 1
modules/client_topmenu/topmenu.otui View File

@@ -62,7 +62,7 @@ TopPanel
62 62
     anchors.bottom: parent.bottom
63 63
     anchors.left: prev.right
64 64
     visible: false
65
-    
65
+
66 66
   UILabel
67 67
     id: frameCounter
68 68
     text-align: right

+ 1
- 1
modules/corelib/bitwise.lua View File

@@ -5,7 +5,7 @@ function Bit.bit(p)
5 5
 end
6 6
 
7 7
 function Bit.hasBit(x, p)
8
-  return x % (p + p) >= p       
8
+  return x % (p + p) >= p
9 9
 end
10 10
 
11 11
 function Bit.setbit(x, p)

+ 1
- 1
modules/game_interface/styles/logoutwindow.otui View File

@@ -18,7 +18,7 @@ LogoutWindow < MainWindow
18 18
     anchors.left: parent.left
19 19
     anchors.bottom: parent.bottom
20 20
     margin-left: 65
21
-    
21
+
22 22
   Button
23 23
     id: buttonNo
24 24
     !text: tr('No')

+ 13
- 13
modules/game_market/market.lua View File

@@ -183,16 +183,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
183 183
   else
184 184
     for k, stat in pairs(saleStats) do
185 185
       if not table.empty(stat) then
186
-        sellStatsTable:addRow({{['text'] = 'Total Transations:'}, 
186
+        sellStatsTable:addRow({{['text'] = 'Total Transations:'},
187 187
           {['text'] = stat[1], ['width'] = 270}})
188 188
 
189
-        sellStatsTable:addRow({{['text'] = 'Highest Price:'}, 
189
+        sellStatsTable:addRow({{['text'] = 'Highest Price:'},
190 190
           {['text'] = stat[3], ['width'] = 270}})
191 191
 
192
-        sellStatsTable:addRow({{['text'] = 'Average Price:'}, 
192
+        sellStatsTable:addRow({{['text'] = 'Average Price:'},
193 193
           {['text'] = math.floor(stat[2]/stat[1])}})
194 194
 
195
-        sellStatsTable:addRow({{['text'] = 'Lowest Price:'}, 
195
+        sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
196 196
           {['text'] = stat[4], ['width'] = 270}})
197 197
       end
198 198
     end
@@ -205,16 +205,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
205 205
   else
206 206
     for k, stat in pairs(purchaseStats) do
207 207
       if not table.empty(stat) then
208
-        buyStatsTable:addRow({{['text'] = 'Total Transations:'}, 
208
+        buyStatsTable:addRow({{['text'] = 'Total Transations:'},
209 209
           {['text'] = stat[1], ['width'] = 270}})
210 210
 
211
-        buyStatsTable:addRow({{['text'] = 'Highest Price:'}, 
211
+        buyStatsTable:addRow({{['text'] = 'Highest Price:'},
212 212
           {['text'] = stat[3], ['width'] = 270}})
213 213
 
214
-        buyStatsTable:addRow({{['text'] = 'Average Price:'}, 
214
+        buyStatsTable:addRow({{['text'] = 'Average Price:'},
215 215
           {['text'] = math.floor(stat[2]/stat[1]), ['width'] = 270}})
216 216
 
217
-        buyStatsTable:addRow({{['text'] = 'Lowest Price:'}, 
217
+        buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
218 218
           {['text'] = stat[4], ['width'] = 270}})
219 219
       end
220 220
     end
@@ -230,7 +230,7 @@ local function updateSelectedItem(newItem)
230 230
     nameLabel:setText(selectedItem.item.marketData.name)
231 231
     -- update offer types
232 232
     Market.enableCreateOffer(true)
233
-    
233
+
234 234
     MarketProtocol.sendMarketBrowse(selectedItem.item.ptr:getId()) -- send browsed msg
235 235
   else
236 236
     Market.Market.clearSelectedItem()
@@ -429,7 +429,7 @@ local function initInterface()
429 429
   -- setup 'My Offer' section tabs
430 430
   myOffersPanel = g_ui.loadUI('ui/myoffers.otui')
431 431
   mainTabBar:addTab(tr('My Offers'), myOffersPanel)
432
-    
432
+
433 433
   offersTabBar = myOffersPanel:getChildById('offersTabBar')
434 434
   offersTabBar:setContentWidget(myOffersPanel:getChildById('offersTabContent'))
435 435
 
@@ -483,7 +483,7 @@ local function initInterface()
483 483
   categoryList:addOption(getMarketCategoryName(255)) -- meta weapons
484 484
   categoryList:setCurrentOption(getMarketCategoryName(MarketCategory.First))
485 485
   subCategoryList:setEnabled(false)
486
-  
486
+
487 487
   -- hook item filters
488 488
   categoryList.onOptionChange = onChangeCategory
489 489
   subCategoryList.onOptionChange = onChangeSubCategory
@@ -521,7 +521,7 @@ function terminate()
521 521
   if marketWindow then
522 522
     marketWindow:destroy()
523 523
   end
524
-  
524
+
525 525
   Market = nil
526 526
 end
527 527
 
@@ -693,7 +693,7 @@ function Market.loadDepotItems(depotItems)
693 693
       table.insert(items, newItem)
694 694
     end
695 695
   end
696
-  
696
+
697 697
   for _, newItem in pairs(items) do
698 698
     local marketData = newItem:getMarketData()
699 699
 

+ 1
- 1
modules/game_tibiafiles/.gitignore View File

@@ -1 +1 @@
1
- 
1
+

+ 1
- 1
src/framework/CMakeLists.txt View File

@@ -4,7 +4,7 @@
4 4
 # FRAMEWORK_NET
5 5
 # FRAMEWORK_XML
6 6
 
7
-# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatiblity
7
+# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatibility
8 8
 if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
9 9
     get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
10 10
 endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)

+ 1
- 1
src/framework/xml/tinystr.h View File

@@ -224,7 +224,7 @@ class TiXmlString
224 224
             // to the normal allocation, although use an 'int' for systems
225 225
             // that are overly picky about structure alignment.
226 226
             const size_type bytesNeeded = sizeof(Rep) + cap;
227
-            const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); 
227
+            const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int );
228 228
             rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );
229 229
 
230 230
             rep_->str[ rep_->size = sz ] = '\0';

+ 40
- 40
src/framework/xml/tinyxml.cpp View File

@@ -57,7 +57,7 @@ void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
57 57
     {
58 58
         unsigned char c = (unsigned char) str[i];
59 59
 
60
-        if (    c == '&' 
60
+        if (    c == '&'
61 61
              && i < ( (int)str.length() - 2 )
62 62
              && str[i+1] == '#'
63 63
              && str[i+2] == 'x' )
@@ -110,12 +110,12 @@ void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
110 110
             // Easy pass at non-alpha/numeric/symbol
111 111
             // Below 32 is symbolic.
112 112
             char buf[ 32 ];
113
-            
114
-            #if defined(TIXML_SNPRINTF)        
113
+
114
+            #if defined(TIXML_SNPRINTF)
115 115
                 TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
116 116
             #else
117 117
                 sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
118
-            #endif        
118
+            #endif
119 119
 
120 120
             //*ME:    warning C4267: convert 'size_t' to 'int'
121 121
             //*ME:    Int-Cast to make compiler happy ...
@@ -154,14 +154,14 @@ TiXmlNode::~TiXmlNode()
154 154
         temp = node;
155 155
         node = node->next;
156 156
         delete temp;
157
-    }    
157
+    }
158 158
 }
159 159
 
160 160
 
161 161
 void TiXmlNode::CopyTo( TiXmlNode* target ) const
162 162
 {
163 163
     target->SetValue (value.c_str() );
164
-    target->userData = userData; 
164
+    target->userData = userData;
165 165
     target->location = location;
166 166
 }
167 167
 
@@ -176,7 +176,7 @@ void TiXmlNode::Clear()
176 176
         temp = node;
177 177
         node = node->next;
178 178
         delete temp;
179
-    }    
179
+    }
180 180
 
181 181
     firstChild = 0;
182 182
     lastChild = 0;
@@ -191,7 +191,7 @@ TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )
191 191
     if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT )
192 192
     {
193 193
         delete node;
194
-        if ( GetDocument() ) 
194
+        if ( GetDocument() )
195 195
             GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
196 196
         return 0;
197 197
     }
@@ -215,7 +215,7 @@ TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
215 215
 {
216 216
     if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
217 217
     {
218
-        if ( GetDocument() ) 
218
+        if ( GetDocument() )
219 219
             GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
220 220
         return 0;
221 221
     }
@@ -228,13 +228,13 @@ TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
228 228
 
229 229
 
230 230
 TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )
231
-{    
231
+{
232 232
     if ( !beforeThis || beforeThis->parent != this ) {
233 233
         return 0;
234 234
     }
235 235
     if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
236 236
     {
237
-        if ( GetDocument() ) 
237
+        if ( GetDocument() )
238 238
             GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
239 239
         return 0;
240 240
     }
@@ -267,7 +267,7 @@ TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& a
267 267
     }
268 268
     if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
269 269
     {
270
-        if ( GetDocument() ) 
270
+        if ( GetDocument() )
271 271
             GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
272 272
         return 0;
273 273
     }
@@ -304,7 +304,7 @@ TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& wit
304 304
     if ( withThis.ToDocument() ) {
305 305
         // A document can never be a child.    Thanks to Noam.
306 306
         TiXmlDocument* document = GetDocument();
307
-        if ( document ) 
307
+        if ( document )
308 308
             document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
309 309
         return 0;
310 310
     }
@@ -339,7 +339,7 @@ bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )
339 339
     }
340 340
 
341 341
     if ( removeThis->parent != this )
342
-    {    
342
+    {
343 343
         assert( 0 );
344 344
         return false;
345 345
     }
@@ -410,7 +410,7 @@ const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode*
410 410
 }
411 411
 
412 412
 
413
-const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const 
413
+const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
414 414
 {
415 415
     const TiXmlNode* node;
416 416
     for ( node = next; node; node = node->next )
@@ -515,7 +515,7 @@ const TiXmlDocument* TiXmlNode::GetDocument() const
515 515
     return 0;
516 516
 }
517 517
 
518
-TiXmlElement::TiXmlElement( const std::string& _value ) 
518
+TiXmlElement::TiXmlElement( const std::string& _value )
519 519
     : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
520 520
 {
521 521
     firstChild = lastChild = 0;
@@ -526,7 +526,7 @@ TiXmlElement::TiXmlElement( const TiXmlElement& copy)
526 526
     : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
527 527
 {
528 528
     firstChild = lastChild = 0;
529
-    copy.CopyTo( this );    
529
+    copy.CopyTo( this );
530 530
 }
531 531
 
532 532
 
@@ -658,7 +658,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
658 658
     // superclass:
659 659
     TiXmlNode::CopyTo( target );
660 660
 
661
-    // Element class: 
661
+    // Element class:
662 662
     // Clone the attributes, then clone the children.
663 663
     const TiXmlAttribute* attribute = 0;
664 664
     for(    attribute = attributeSet.First();
@@ -677,7 +677,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
677 677
 
678 678
 bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const
679 679
 {
680
-    if ( visitor->VisitEnter( *this, attributeSet.First() ) ) 
680
+    if ( visitor->VisitEnter( *this, attributeSet.First() ) )
681 681
     {
682 682
         for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
683 683
         {
@@ -771,7 +771,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
771 771
     value = filename;
772 772
 
773 773
     // reading in binary mode so that tinyxml can normalize the EOL
774
-    FILE* file = TiXmlFOpen( value.c_str (), "rb" );    
774
+    FILE* file = TiXmlFOpen( value.c_str (), "rb" );
775 775
 
776 776
     if ( file )
777 777
     {
@@ -788,7 +788,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
788 788
 
789 789
 bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
790 790
 {
791
-    if ( !file ) 
791
+    if ( !file )
792 792
     {
793 793
         SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
794 794
         return false;
@@ -815,13 +815,13 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
815 815
     // 2.11 End-of-Line Handling
816 816
     // <snip>
817 817
     // <quote>
818
-    // ...the XML processor MUST behave as if it normalized all line breaks in external 
819
-    // parsed entities (including the document entity) on input, before parsing, by translating 
820
-    // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to 
818
+    // ...the XML processor MUST behave as if it normalized all line breaks in external
819
+    // parsed entities (including the document entity) on input, before parsing, by translating
820
+    // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
821 821
     // a single #xA character.
822 822
     // </quote>
823 823
     //
824
-    // It is not clear fgets does that, and certainly isn't clear it works cross platform. 
824
+    // It is not clear fgets does that, and certainly isn't clear it works cross platform.
825 825
     // Generally, you expect fgets to translate from the convention of the OS to the c/unix
826 826
     // convention, and not work generally.
827 827
 
@@ -846,7 +846,7 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
846 846
     // a newline-carriage return is hit.
847 847
     //
848 848
     // Wikipedia:
849
-    // Systems based on ASCII or a compatible character set use either LF  (Line feed, '\n', 0x0A, 10 in decimal) or 
849
+    // Systems based on ASCII or a compatible character set use either LF  (Line feed, '\n', 0x0A, 10 in decimal) or
850 850
     // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)...
851 851
     //        * LF:    Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
852 852
     //        * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
@@ -900,7 +900,7 @@ bool TiXmlDocument::SaveFile( const char * filename ) const
900 900
 
901 901
 bool TiXmlDocument::SaveFile( FILE* fp ) const
902 902
 {
903
-    if ( useMicrosoftBOM ) 
903
+    if ( useMicrosoftBOM )
904 904
     {
905 905
         const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
906 906
         const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
@@ -930,7 +930,7 @@ void TiXmlDocument::CopyTo( TiXmlDocument* target ) const
930 930
     for ( node = firstChild; node; node = node->NextSibling() )
931 931
     {
932 932
         target->LinkEndChild( node->Clone() );
933
-    }    
933
+    }
934 934
 }
935 935
 
936 936
 
@@ -1053,7 +1053,7 @@ int TiXmlAttribute::QueryDoubleValue( double* dval ) const
1053 1053
 void TiXmlAttribute::SetIntValue( int _value )
1054 1054
 {
1055 1055
     char buf [64];
1056
-    #if defined(TIXML_SNPRINTF)        
1056
+    #if defined(TIXML_SNPRINTF)
1057 1057
         TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
1058 1058
     #else
1059 1059
         sprintf (buf, "%d", _value);
@@ -1064,7 +1064,7 @@ void TiXmlAttribute::SetIntValue( int _value )
1064 1064
 void TiXmlAttribute::SetDoubleValue( double _value )
1065 1065
 {
1066 1066
     char buf [256];
1067
-    #if defined(TIXML_SNPRINTF)        
1067
+    #if defined(TIXML_SNPRINTF)
1068 1068
         TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value);
1069 1069
     #else
1070 1070
         sprintf (buf, "%g", _value);
@@ -1167,7 +1167,7 @@ bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
1167 1167
 
1168 1168
 
1169 1169
 TiXmlNode* TiXmlText::Clone() const
1170
-{    
1170
+{
1171 1171
     TiXmlText* clone = 0;
1172 1172
     clone = new TiXmlText( "" );
1173 1173
 
@@ -1206,7 +1206,7 @@ TiXmlDeclaration::TiXmlDeclaration(    const std::string& _version,
1206 1206
 TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )
1207 1207
     : TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
1208 1208
 {
1209
-    copy.CopyTo( this );    
1209
+    copy.CopyTo( this );
1210 1210
 }
1211 1211
 
1212 1212
 
@@ -1257,7 +1257,7 @@ bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const
1257 1257
 
1258 1258
 
1259 1259
 TiXmlNode* TiXmlDeclaration::Clone() const
1260
-{    
1260
+{
1261 1261
     TiXmlDeclaration* clone = new TiXmlDeclaration();
1262 1262
 
1263 1263
     if ( !clone )
@@ -1395,7 +1395,7 @@ TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name )
1395 1395
 }
1396 1396
 
1397 1397
 
1398
-#ifdef TIXML_USE_STL    
1398
+#ifdef TIXML_USE_STL
1399 1399
 std::istream& operator>> (std::istream & in, TiXmlNode & base)
1400 1400
 {
1401 1401
     TIXML_STRING tag;
@@ -1408,7 +1408,7 @@ std::istream& operator>> (std::istream & in, TiXmlNode & base)
1408 1408
 #endif
1409 1409
 
1410 1410
 
1411
-#ifdef TIXML_USE_STL    
1411
+#ifdef TIXML_USE_STL
1412 1412
 std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)
1413 1413
 {
1414 1414
     TiXmlPrinter printer;
@@ -1578,12 +1578,12 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
1578 1578
         attrib->Print( 0, 0, &buffer );
1579 1579
     }
1580 1580
 
1581
-    if ( !element.FirstChild() ) 
1581
+    if ( !element.FirstChild() )
1582 1582
     {
1583 1583
         buffer += " />";
1584 1584
         DoLineBreak();
1585 1585
     }
1586
-    else 
1586
+    else
1587 1587
     {
1588 1588
         buffer += ">";
1589 1589
         if (    element.FirstChild()->ToText()
@@ -1598,7 +1598,7 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
1598 1598
             DoLineBreak();
1599 1599
         }
1600 1600
     }
1601
-    ++depth;    
1601
+    ++depth;
1602 1602
     return true;
1603 1603
 }
1604 1604
 
@@ -1606,11 +1606,11 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
1606 1606
 bool TiXmlPrinter::VisitExit( const TiXmlElement& element )
1607 1607
 {
1608 1608
     --depth;
1609
-    if ( !element.FirstChild() ) 
1609
+    if ( !element.FirstChild() )
1610 1610
     {
1611 1611
         // nothing.
1612 1612
     }
1613
-    else 
1613
+    else
1614 1614
     {
1615 1615
         if ( simpleTextPrint )
1616 1616
         {

+ 4
- 4
src/framework/xml/tinyxmlerror.cpp View File

@@ -2,12 +2,12 @@
2 2
 www.sourceforge.net/projects/tinyxml
3 3
 Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
4 4
 
5
-This software is provided 'as-is', without any express or implied 
6
-warranty. In no event will the authors be held liable for any 
5
+This software is provided 'as-is', without any express or implied
6
+warranty. In no event will the authors be held liable for any
7 7
 damages arising from the use of this software.
8 8
 
9
-Permission is granted to anyone to use this software for any 
10
-purpose, including commercial applications, and to alter it and 
9
+Permission is granted to anyone to use this software for any
10
+purpose, including commercial applications, and to alter it and
11 11
 redistribute it freely, subject to the following restrictions:
12 12
 
13 13
 1. The origin of this software must not be misrepresented; you must

+ 76
- 76
src/framework/xml/tinyxmlparser.cpp View File

@@ -2,23 +2,23 @@
2 2
 www.sourceforge.net/projects/tinyxml
3 3
 Original code by Lee Thomason (www.grinninglizard.com)
4 4
 
5
-This software is provided 'as-is', without any express or implied 
6
-warranty. In no event will the authors be held liable for any 
5
+This software is provided 'as-is', without any express or implied
6
+warranty. In no event will the authors be held liable for any
7 7
 damages arising from the use of this software.
8 8
 
9
-Permission is granted to anyone to use this software for any 
10
-purpose, including commercial applications, and to alter it and 
9
+Permission is granted to anyone to use this software for any
10
+purpose, including commercial applications, and to alter it and
11 11
 redistribute it freely, subject to the following restrictions:
12 12
 
13
-1. The origin of this software must not be misrepresented; you must 
13
+1. The origin of this software must not be misrepresented; you must
14 14
 not claim that you wrote the original software. If you use this
15 15
 software in a product, an acknowledgment in the product documentation
16 16
 would be appreciated but is not required.
17 17
 
18
-2. Altered source versions must be plainly marked as such, and 
18
+2. Altered source versions must be plainly marked as such, and
19 19
 must not be misrepresented as being the original software.
20 20
 
21
-3. This notice may not be removed or altered from any source 
21
+3. This notice may not be removed or altered from any source
22 22
 distribution.
23 23
 */
24 24
 
@@ -39,8 +39,8 @@ distribution.
39 39
 
40 40
 // Note tha "PutString" hardcodes the same list. This
41 41
 // is less flexible than it appears. Changing the entries
42
-// or order will break putstring.    
43
-TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] = 
42
+// or order will break putstring.
43
+TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] =
44 44
 {
45 45
     { "&amp;",  5, '&' },
46 46
     { "&lt;",   4, '<' },
@@ -54,16 +54,16 @@ TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] =
54 54
 // Including the basic of this table, which determines the #bytes in the
55 55
 // sequence from the lead byte. 1 placed for invalid sequences --
56 56
 // although the result will be junk, pass it through as much as possible.
57
-// Beware of the non-characters in UTF-8:    
57
+// Beware of the non-characters in UTF-8:
58 58
 //                ef bb bf (Microsoft "lead bytes")
59 59
 //                ef bf be
60
-//                ef bf bf 
60
+//                ef bf bf
61 61
 
62 62
 const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
63 63
 const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
64 64
 const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
65 65
 
66
-const int TiXmlBase::utf8ByteTable[256] = 
66
+const int TiXmlBase::utf8ByteTable[256] =
67 67
 {
68 68
     //    0    1    2    3    4    5    6    7    8    9    a    b    c    d    e    f
69 69
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x00
@@ -75,9 +75,9 @@ const int TiXmlBase::utf8ByteTable[256] =
75 75
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x60
76 76
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x70    End of ASCII range
77 77
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x80 0x80 to 0xc1 invalid
78
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x90 
79
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0xa0 
80
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0xb0 
78
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0x90
79
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0xa0
80
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    // 0xb0
81 81
         1,    1,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    // 0xc0 0xc2 to 0xdf 2 byte
82 82
         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    // 0xd0
83 83
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    // 0xe0 0xe0 to 0xef 3 byte
@@ -91,7 +91,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
91 91
     const unsigned long BYTE_MARK = 0x80;
92 92
     const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
93 93
 
94
-    if (input < 0x80) 
94
+    if (input < 0x80)
95 95
         *length = 1;
96 96
     else if ( input < 0x800 )
97 97
         *length = 2;
@@ -105,22 +105,22 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
105 105
     output += *length;
106 106
 
107 107
     // Scary scary fall throughs.
108
-    switch (*length) 
108
+    switch (*length)
109 109
     {
110 110
         case 4:
111
-            --output; 
112
-            *output = (char)((input | BYTE_MARK) & BYTE_MASK); 
111
+            --output;
112
+            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
113 113
             input >>= 6;
114 114
         case 3:
115
-            --output; 
116
-            *output = (char)((input | BYTE_MARK) & BYTE_MASK); 
115
+            --output;
116
+            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
117 117
             input >>= 6;
118 118
         case 2:
119
-            --output; 
120
-            *output = (char)((input | BYTE_MARK) & BYTE_MASK); 
119
+            --output;
120
+            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
121 121
             input >>= 6;
122 122
         case 1:
123
-            --output; 
123
+            --output;
124 124
             *output = (char)(input | FIRST_BYTE_MARK[*length]);
125 125
     }
126 126
 }
@@ -130,7 +130,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
130 130
 {
131 131
     // This will only work for low-ascii, everything else is assumed to be a valid
132 132
     // letter. I'm not sure this is the best approach, but it is quite tricky trying
133
-    // to figure out alhabetical vs. not across encoding. So take a very 
133
+    // to figure out alhabetical vs. not across encoding. So take a very
134 134
     // conservative approach.
135 135
 
136 136
 //    if ( encoding == TIXML_ENCODING_UTF8 )
@@ -151,7 +151,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
151 151
 {
152 152
     // This will only work for low-ascii, everything else is assumed to be a valid
153 153
     // letter. I'm not sure this is the best approach, but it is quite tricky trying
154
-    // to figure out alhabetical vs. not across encoding. So take a very 
154
+    // to figure out alhabetical vs. not across encoding. So take a very
155 155
     // conservative approach.
156 156
 
157 157
 //    if ( encoding == TIXML_ENCODING_UTF8 )
@@ -224,7 +224,7 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
224 224
             case '\r':
225 225
                 // bump down to the next line
226 226
                 ++row;
227
-                col = 0;                
227
+                col = 0;
228 228
                 // Eat the character
229 229
                 ++p;
230 230
 
@@ -266,11 +266,11 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
266 266
                         // In these cases, don't advance the column. These are
267 267
                         // 0-width spaces.
268 268
                         if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
269
-                            p += 3;    
269
+                            p += 3;
270 270
                         else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
271
-                            p += 3;    
271
+                            p += 3;
272 272
                         else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
273
-                            p += 3;    
273
+                            p += 3;
274 274
                         else
275 275
                             { p +=3; ++col; }    // A normal character.
276 276
                     }
@@ -322,10 +322,10 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
322 322
         while ( *p )
323 323
         {
324 324
             const unsigned char* pU = (const unsigned char*)p;
325
-            
325
+
326 326
             // Skip the stupid Microsoft UTF-8 Byte order marks
327 327
             if (    *(pU+0)==TIXML_UTF_LEAD_0
328
-                 && *(pU+1)==TIXML_UTF_LEAD_1 
328
+                 && *(pU+1)==TIXML_UTF_LEAD_1
329 329
                  && *(pU+2)==TIXML_UTF_LEAD_2 )
330 330
             {
331 331
                 p += 3;
@@ -413,12 +413,12 @@ const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncodi
413 413
     // After that, they can be letters, underscores, numbers,
414 414
     // hyphens, or colons. (Colons are valid ony for namespaces,
415 415
     // but tinyxml can't tell namespaces from names.)
416
-    if (    p && *p 
416
+    if (    p && *p
417 417
          && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )
418 418
     {
419 419
         const char* start = p;
420 420
         while(        p && *p
421
-                &&    (        IsAlphaNum( (unsigned char ) *p, encoding ) 
421
+                &&    (        IsAlphaNum( (unsigned char ) *p, encoding )
422 422
                          || *p == '_'
423 423
                          || *p == '-'
424 424
                          || *p == '.'
@@ -469,7 +469,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml
469 469
                     ucs += mult * (*q - 'a' + 10);
470 470
                 else if ( *q >= 'A' && *q <= 'F' )
471 471
                     ucs += mult * (*q - 'A' + 10 );
472
-                else 
472
+                else
473 473
                     return 0;
474 474
                 mult *= 16;
475 475
                 --q;
@@ -492,7 +492,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml
492 492
             {
493 493
                 if ( *q >= '0' && *q <= '9' )
494 494
                     ucs += mult * (*q - '0');
495
-                else 
495
+                else
496 496
                     return 0;
497 497
                 mult *= 10;
498 498
                 --q;
@@ -571,10 +571,10 @@ bool TiXmlBase::StringEqual( const char* p,
571 571
     return false;
572 572
 }
573 573
 
574
-const char* TiXmlBase::ReadText(    const char* p, 
575
-                                    TIXML_STRING * text, 
576
-                                    bool trimWhiteSpace, 
577
-                                    const char* endTag, 
574
+const char* TiXmlBase::ReadText(    const char* p,
575
+                                    TIXML_STRING * text,
576
+                                    bool trimWhiteSpace,
577
+                                    const char* endTag,
578 578
                                     bool caseInsensitive,
579 579
                                     TiXmlEncoding encoding )
580 580
 {
@@ -647,7 +647,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
647 647
     // This "pre-streaming" will never read the closing ">" so the
648 648
     // sub-tag can orient itself.
649 649
 
650
-    if ( !StreamTo( in, '<', tag ) ) 
650
+    if ( !StreamTo( in, '<', tag ) )
651 651
     {
652 652
         SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
653 653
         return;
@@ -669,7 +669,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
669 669
 
670 670
         if ( in->good() )
671 671
         {
672
-            // We now have something we presume to be a node of 
672
+            // We now have something we presume to be a node of
673 673
             // some sort. Identify it, and call the node to
674 674
             // continue streaming.
675 675
             TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );
@@ -778,7 +778,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX
778 778
                 encoding = TIXML_ENCODING_UTF8;
779 779
             else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )
780 780
                 encoding = TIXML_ENCODING_UTF8;    // incorrect, but be nice
781
-            else 
781
+            else
782 782
                 encoding = TIXML_ENCODING_LEGACY;
783 783
         }
784 784
 
@@ -796,7 +796,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX
796 796
 }
797 797
 
798 798
 void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )
799
-{    
799
+{
800 800
     // The first error in a chain is more accurate - don't set again!
801 801
     if ( error )
802 802
         return;
@@ -832,7 +832,7 @@ TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )
832 832
         return 0;
833 833
     }
834 834
 
835
-    // What is this thing? 
835
+    // What is this thing?
836 836
     // - Elements start with a letter or underscore, but xml is reserved.
837 837
     // - Comments: <!--
838 838
     // - Decleration: <?xml
@@ -915,7 +915,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
915 915
             return;
916 916
         }
917 917
         (*tag) += (char) c ;
918
-        
918
+
919 919
         if ( c == '>' )
920 920
             break;
921 921
     }
@@ -925,7 +925,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
925 925
     // Okay...if we are a "/>" tag, then we're done. We've read a complete tag.
926 926
     // If not, identify and stream.
927 927
 
928
-    if (    tag->at( tag->length() - 1 ) == '>' 
928
+    if (    tag->at( tag->length() - 1 ) == '>'
929 929
          && tag->at( tag->length() - 2 ) == '/' )
930 930
     {
931 931
         // All good!
@@ -943,7 +943,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
943 943
             StreamWhiteSpace( in, tag );
944 944
 
945 945
             // Do we have text?
946
-            if ( in->good() && in->peek() != '<' ) 
946
+            if ( in->good() && in->peek() != '<' )
947 947
             {
948 948
                 // Yep, text.
949 949
                 TiXmlText text( "" );
@@ -976,7 +976,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
976 976
                         document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
977 977
                     return;
978 978
                 }
979
-                
979
+
980 980
                 if ( c == '>' )
981 981
                     break;
982 982
 
@@ -1095,7 +1095,7 @@ const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
1095 1095
             // Empty tag.
1096 1096
             if ( *p  != '>' )
1097 1097
             {
1098
-                if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );        
1098
+                if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
1099 1099
                 return 0;
1100 1100
             }
1101 1101
             return (p+1);
@@ -1117,7 +1117,7 @@ const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
1117 1117
             // We should find the end tag now
1118 1118
             // note that:
1119 1119
             // </foo > and
1120
-            // </foo> 
1120
+            // </foo>
1121 1121
             // are both valid end tags.
1122 1122
             if ( StringEqual( p, endTag.c_str(), false, encoding ) )
1123 1123
             {
@@ -1211,8 +1211,8 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
1211 1211
                 LinkEndChild( textNode );
1212 1212
             else
1213 1213
                 delete textNode;
1214
-        } 
1215
-        else 
1214
+        }
1215
+        else
1216 1216
         {
1217 1217
             // We hit a '<'
1218 1218
             // Have we hit a new element or an end tag? This could also be
@@ -1228,7 +1228,7 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
1228 1228
                 {
1229 1229
                     p = node->Parse( p, data, encoding );
1230 1230
                     LinkEndChild( node );
1231
-                }                
1231
+                }
1232 1232
                 else
1233 1233
                 {
1234 1234
                     return 0;
@@ -1242,7 +1242,7 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
1242 1242
     if ( !p )
1243 1243
     {
1244 1244
         if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
1245
-    }    
1245
+    }
1246 1246
     return p;
1247 1247
 }
1248 1248
 
@@ -1252,7 +1252,7 @@ void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
1252 1252
 {
1253 1253
     while ( in->good() )
1254 1254
     {
1255
-        int c = in->get();    
1255
+        int c = in->get();
1256 1256
         if ( c <= 0 )
1257 1257
         {
1258 1258
             TiXmlDocument* document = GetDocument();
@@ -1265,7 +1265,7 @@ void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
1265 1265
         if ( c == '>' )
1266 1266
         {
1267 1267
             // All is well.
1268
-            return;        
1268
+            return;
1269 1269
         }
1270 1270
     }
1271 1271
 }
@@ -1298,7 +1298,7 @@ const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
1298 1298
 
1299 1299
     if ( !p )
1300 1300
     {
1301
-        if ( document )    
1301
+        if ( document )
1302 1302
             document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
1303 1303
     }
1304 1304
     if ( p && *p == '>' )
@@ -1311,7 +1311,7 @@ void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
1311 1311
 {
1312 1312
     while ( in->good() )
1313 1313
     {
1314
-        int c = in->get();    
1314
+        int c = in->get();
1315 1315
         if ( c <= 0 )
1316 1316
         {
1317 1317
             TiXmlDocument* document = GetDocument();
@@ -1322,12 +1322,12 @@ void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
1322 1322
 
1323 1323
         (*tag) += (char) c;
1324 1324
 
1325
-        if ( c == '>' 
1325
+        if ( c == '>'
1326 1326
              && tag->at( tag->length() - 2 ) == '-'
1327 1327
              && tag->at( tag->length() - 3 ) == '-' )
1328 1328
         {
1329 1329
             // All is well.
1330
-            return;        
1330
+            return;
1331 1331
         }
1332 1332
     }
1333 1333
 }
@@ -1363,11 +1363,11 @@ const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
1363 1363
     //
1364 1364
     // from the XML spec:
1365 1365
     /*
1366
-     [Definition: Comments may appear anywhere in a document outside other markup; in addition, 
1367
-                  they may appear within the document type declaration at places allowed by the grammar. 
1368
-                  They are not part of the document's character data; an XML processor MAY, but need not, 
1369
-                  make it possible for an application to retrieve the text of comments. For compatibility, 
1370
-                  the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity 
1366
+     [Definition: Comments may appear anywhere in a document outside other markup; in addition,
1367
+                  they may appear within the document type declaration at places allowed by the grammar.
1368
+                  They are not part of the document's character data; an XML processor MAY, but need not,
1369
+                  make it possible for an application to retrieve the text of comments. For compatibility,
1370
+                  the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
1371 1371
                   references MUST NOT be recognized within comments.
1372 1372
 
1373 1373
                   An example of a comment:
@@ -1382,7 +1382,7 @@ const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
1382 1382
         value.append( p, 1 );
1383 1383
         ++p;
1384 1384
     }
1385
-    if ( p && *p ) 
1385
+    if ( p && *p )
1386 1386
         p += strlen( endTag );
1387 1387
 
1388 1388
     return p;
@@ -1421,7 +1421,7 @@ const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlE
1421 1421
         if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
1422 1422
         return 0;
1423 1423
     }
1424
-    
1424
+
1425 1425
     const char* end;
1426 1426
     const char SINGLE_QUOTE = '\'';
1427 1427
     const char DOUBLE_QUOTE = '\"';
@@ -1450,7 +1450,7 @@ const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlE
1450 1450
         {
1451 1451
             if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {
1452 1452
                 // [ 1451649 ] Attribute values with trailing quotes not handled correctly
1453
-                // We did not have an opening quote but seem to have a 
1453
+                // We did not have an opening quote but seem to have a
1454 1454
                 // closing one. Give up and throw an error.
1455 1455
                 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
1456 1456
                 return 0;
@@ -1467,8 +1467,8 @@ void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
1467 1467
 {
1468 1468
     while ( in->good() )
1469 1469
     {
1470
-        int c = in->peek();    
1471
-        if ( !cdata && (c == '<' ) ) 
1470
+        int c = in->peek();
1471
+        if ( !cdata && (c == '<' ) )
1472 1472
         {
1473 1473
             return;
1474 1474
         }
@@ -1489,7 +1489,7 @@ void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
1489 1489
                 // terminator of cdata.
1490 1490
                 return;
1491 1491
             }
1492
-        }    
1492
+        }
1493 1493
     }
1494 1494
 }
1495 1495
 #endif
@@ -1529,7 +1529,7 @@ const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncodi
1529 1529
             ++p;
1530 1530
         }
1531 1531
 
1532
-        TIXML_STRING dummy; 
1532
+        TIXML_STRING dummy;
1533 1533
         p = ReadText( p, &dummy, false, endTag, false, encoding );
1534 1534
         return p;
1535 1535
     }
@@ -1603,19 +1603,19 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
1603 1603
         if ( StringEqual( p, "version", true, _encoding ) )
1604 1604
         {
1605 1605
             TiXmlAttribute attrib;
1606
-            p = attrib.Parse( p, data, _encoding );        
1606
+            p = attrib.Parse( p, data, _encoding );
1607 1607
             version = attrib.Value();
1608 1608
         }
1609 1609
         else if ( StringEqual( p, "encoding", true, _encoding ) )
1610 1610
         {
1611 1611
             TiXmlAttribute attrib;
1612
-            p = attrib.Parse( p, data, _encoding );        
1612
+            p = attrib.Parse( p, data, _encoding );
1613 1613
             encoding = attrib.Value();
1614 1614
         }
1615 1615
         else if ( StringEqual( p, "standalone", true, _encoding ) )
1616 1616
         {
1617 1617
             TiXmlAttribute attrib;
1618
-            p = attrib.Parse( p, data, _encoding );        
1618
+            p = attrib.Parse( p, data, _encoding );
1619 1619
             standalone = attrib.Value();
1620 1620
         }
1621 1621
         else

+ 1
- 1
src/otclient/CMakeLists.txt View File

@@ -1,4 +1,4 @@
1
-# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatiblity
1
+# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatibility
2 2
 if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
3 3
     get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
4 4
 endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)

+ 1
- 1
tools/gimp-bitmap-generator/generate_bitmap_font.py View File

@@ -21,7 +21,7 @@ def generate_bitmap_font(timg, tdrawable, font, font_size, first_char, glyph_wid
21 21
 
22 22
 	glyphs_layer = gimp.Layer(image, "Glyphs", width, height, RGBA_IMAGE, 100, NORMAL_MODE)
23 23
 	image.add_layer(glyphs_layer, 0)
24
-	
24
+
25 25
 	disp = gimp.Display(image)
26 26
 
27 27
 	for i in range(char_begin, char_end):

Loading…
Cancel
Save