Browse Source

Add add-assign also for signed long and long long integers in String. Added contributor credit.

Lasse Öörni 10 years ago
parent
commit
9a3ec30b4a
3 changed files with 17 additions and 2 deletions
  1. 1 0
      Docs/Urho3D.dox
  2. 12 2
      Source/Urho3D/Container/Str.cpp
  3. 4 0
      Source/Urho3D/Container/Str.h

+ 1 - 0
Docs/Urho3D.dox

@@ -99,6 +99,7 @@ Urho3D development, contributions and bugfixes by:
 - att
 - att
 - celeron55
 - celeron55
 - hdunderscore
 - hdunderscore
+- marynate
 - mightyCelu
 - mightyCelu
 - nemerle
 - nemerle
 - ninjastone
 - ninjastone

+ 12 - 2
Source/Urho3D/Container/Str.cpp

@@ -182,6 +182,16 @@ String& String::operator += (short rhs)
     return *this += String(rhs);
     return *this += String(rhs);
 }
 }
 
 
+String& String::operator += (long rhs)
+{
+    return *this += String(rhs);
+}
+
+String& String::operator += (long long rhs)
+{
+    return *this += String(rhs);
+}
+
 String& String::operator += (unsigned rhs)
 String& String::operator += (unsigned rhs)
 {
 {
     return *this += String(rhs);
     return *this += String(rhs);
@@ -191,7 +201,7 @@ String& String::operator += (unsigned short rhs)
 {
 {
     return *this += String(rhs);
     return *this += String(rhs);
 }
 }
-    
+
 String& String::operator += (unsigned long rhs)
 String& String::operator += (unsigned long rhs)
 {
 {
     return *this += String(rhs);
     return *this += String(rhs);
@@ -199,7 +209,7 @@ String& String::operator += (unsigned long rhs)
 
 
 String& String::operator += (unsigned long long rhs)
 String& String::operator += (unsigned long long rhs)
 {
 {
-	return *this += String(rhs);
+    return *this += String(rhs);
 }
 }
 
 
 String& String::operator += (float rhs)
 String& String::operator += (float rhs)

+ 4 - 0
Source/Urho3D/Container/Str.h

@@ -206,6 +206,10 @@ public:
     String& operator += (int rhs);
     String& operator += (int rhs);
     /// Add-assign a short integer.
     /// Add-assign a short integer.
     String& operator += (short rhs);
     String& operator += (short rhs);
+    /// Add-assign a long integer.
+    String& operator += (long rhs);
+    /// Add-assign a long long integer.
+    String& operator += (long long rhs);
     /// Add-assign an unsigned integer.
     /// Add-assign an unsigned integer.
     String& operator += (unsigned rhs);
     String& operator += (unsigned rhs);
     /// Add-assign a short unsigned integer.
     /// Add-assign a short unsigned integer.