Browse Source

+ operator für Text klasse ist jetzt const

Kolja Strohm 4 years ago
parent
commit
f29d33dc89
2 changed files with 12 additions and 12 deletions
  1. 6 6
      Text.cpp
  2. 6 6
      Text.h

+ 6 - 6
Text.cpp

@@ -1252,37 +1252,37 @@ bool Text::operator<( Text &t ) const
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und t2
-Text Text::operator+( const Text &t2 )
+Text Text::operator+( const Text &t2 ) const
 {
     return Text( *this ) += t2;
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und t2
-Text Text::operator+( const char *t2 )
+Text Text::operator+( const char *t2 ) const
 {
     return Text( *this ) += t2;
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und num
-Text Text::operator+( const int num )
+Text Text::operator+( const int num ) const
 {
     return Text( *this ) += num;
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und num
-Text Text::operator+( const __int64 num )
+Text Text::operator+( const __int64 num ) const
 {
     return Text( *this ) += num;
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und num
-Text Text::operator+( const double num )
+Text Text::operator+( const double num ) const
 {
     return Text( *this ) += num;
 }
 
 // Erstellt einen neuen Text bestehend aus diesem und num
-Text Text::operator+( const float num )
+Text Text::operator+( const float num ) const
 {
     return Text( *this ) += num;
 }

+ 6 - 6
Text.h

@@ -331,17 +331,17 @@ namespace Framework
         // Prüft, ob der Inhalt des Textes nach alphabetischer Ordnung früher kommt als der Inhalt eines anderen Textes
         __declspec( dllexport ) bool operator<( Text &t ) const;
         // Erstellt einen neuen Text bestehend aus diesem und t2
-        __declspec( dllexport ) Text operator+( const Text &t2 );
+        __declspec( dllexport ) Text operator+( const Text &t2 ) const;
         // Erstellt einen neuen Text bestehend aus diesem und t2
-        __declspec( dllexport ) Text operator+( const char *t2 );
+        __declspec( dllexport ) Text operator+( const char *t2 ) const;
         // Erstellt einen neuen Text bestehend aus diesem und num
-        __declspec( dllexport ) Text operator+( const int num );
+        __declspec( dllexport ) Text operator+( const int num ) const;
         // Erstellt einen neuen Text bestehend aus diesem und num
-        __declspec( dllexport ) Text operator+( const __int64 num );
+        __declspec( dllexport ) Text operator+( const __int64 num ) const;
         // Erstellt einen neuen Text bestehend aus diesem und num
-        __declspec( dllexport ) Text operator+( const double num );
+        __declspec( dllexport ) Text operator+( const double num ) const;
         // Erstellt einen neuen Text bestehend aus diesem und num
-        __declspec( dllexport ) Text operator+( const float num );
+        __declspec( dllexport ) Text operator+( const float num ) const;
     };
 
     class TextReader : public Reader