460_uppsrc2.diff

The diff file to apply for uppsrc directory (second version) - Sender Ghost, 05/26/2013 06:18 AM

Download (2.71 KB)

View differences:

uppsrc/Core/String.h 2013-05-26 07:38:50 +0400
337 337
	String& operator=(StringBuffer& b)                     { *this = String(b); return *this; }
338 338
	String& operator<<=(const String& s)                   { if(this != &s) { String0::Free(); String0::Set(s, s.GetCount()); } return *this; }
339 339

  
340
	String& operator<<(const char *x);
341
	String& operator<<(char *x);
342
	String& operator<<(const String& x);
343
	String& operator<<(char x);
344
	String& operator<<(const void *x);
345
	String& operator<<(void *x);
346
	template <class T>
347
	String& operator<<(const T& x);
348

  
340 349
	void   Shrink()                                        { *this = String(Begin(), GetLength()); }
341 350
	int    GetCharCount() const;
342 351

  
......
430 439
	return FormatPtr(x);
431 440
}
432 441

  
433
force_inline String& operator<<(String& s, const char *x)
442
force_inline String& String::operator<<(const char *x)
434 443
{
435
	s.Cat(x, strlen__(x));
436
	return s;
444
	Cat(x, strlen__(x));
445
	return *this;
437 446
}
438 447

  
439
force_inline String& operator<<(String& s, char *x)
448
force_inline String& String::operator<<(char *x)
440 449
{
441
	s.Cat(x);
442
	return s;
450
	Cat(x);
451
	return *this;
443 452
}
444 453

  
445
inline String& operator<<(String& s, const String &x)
454
inline String& String::operator<<(const String& x)
446 455
{
447
	s.Cat(x);
448
	return s;
456
	Cat(x);
457
	return *this;
449 458
}
450 459

  
451
inline String& operator<<(String& s, char x)
460
inline String& String::operator<<(char x)
452 461
{
453
	s.Cat((int) x);
454
	return s;
462
	Cat((int) x);
463
	return *this;
455 464
}
456 465

  
457
inline String& operator<<(String& s, const void *x)
466
inline String& String::operator<<(const void *x)
458 467
{
459
	s << FormatPtr(x);
460
	return s;
468
	*this << FormatPtr(x);
469
	return *this;
461 470
}
462 471

  
463
inline String& operator<<(String& s, void *x)
472
inline String& String::operator<<(void *x)
464 473
{
465
	s << FormatPtr(x);
466
	return s;
474
	*this << FormatPtr(x);
475
	return *this;
467 476
}
468 477

  
469 478
template <class T>
470
inline String& operator<<(String& s, const T& x)
479
inline String& String::operator<<(const T& x)
471 480
{
472
	s.Cat(AsString(x));
473
	return s;
481
	Cat(AsString(x));
482
	return *this;
474 483
}
475 484

  
476 485
template<>
477
inline String& operator<<(String& s, const char * const &x)
486
inline String& String::operator<<(const char * const &x)
478 487
{
479
	s.Cat(x);
480
	return s;
488
	Cat(x);
489
	return *this;
481 490
}
482

  
491
/*
483 492
template<>
484
inline String& operator<<(String& s, const String &x)
493
inline String& String::operator<<(const String& x)
485 494
{
486
	s.Cat(x);
487
	return s;
495
	Cat(x);
496
	return *this;
488 497
}
489

  
498
*/
490 499
template<>
491
inline String& operator<<(String& s, const char& x)
500
inline String& String::operator<<(const char& x)
492 501
{
493
	s.Cat(x);
494
	return s;
502
	Cat(x);
503
	return *this;
495 504
}
496 505

  
497 506
template<>