static*/
| 378 | } |
| 379 | |
| 380 | /*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) |
| 381 | { |
| 382 | //assert( character > 0 && character < 128 ); // else it won't work in utf-8 |
| 383 | while ( in->good() ) |
| 384 | { |
| 385 | int c = in->peek(); |
| 386 | if ( c == character ) |
| 387 | return true; |
| 388 | if ( c <= 0 ) // Silent failure: can't get document at this scope |
| 389 | return false; |
| 390 | |
| 391 | in->get(); |
| 392 | *tag += (char) c; |
| 393 | } |
| 394 | return false; |
| 395 | } |
| 396 | #endif |
| 397 | |
| 398 | // One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The |