Changeset 7abc3de for libcfa/src
- Timestamp:
 - Jan 17, 2024, 6:31:03 PM (22 months ago)
 - Branches:
 - master
 - Children:
 - 906d8fa
 - Parents:
 - 11f65b3
 - Location:
 - libcfa/src/collections
 - Files:
 - 
      
- 3 edited
 
- 
          
  string.cfa (modified) (2 diffs)
 - 
          
  string.hfa (modified) (1 diff)
 - 
          
  string_res.hfa (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
libcfa/src/collections/string.cfa
r11f65b3 r7abc3de 45 45 } 46 46 47 void ?{}( string & s, const string & s2, size_t maxlen) { 48 (s.inner) { malloc() }; 49 ?{}( *s.inner, *s2.inner, COPY_VALUE, maxlen ); 50 } 51 52 47 53 void ?{}( string & s, string & c ) { 48 54 ?{}( s, (const string &) c ); … … 51 57 void ?{}( string & s, const char c ) { 52 58 (s.inner) { malloc() }; 53 char cs[2] = { c, '\0' }; 54 ?{}( *s.inner, cs ); 59 ?{}( *s.inner, c ); 55 60 } 56 61  - 
      
libcfa/src/collections/string.hfa
r11f65b3 r7abc3de 34 34 void ?{}(string & s); // empty string 35 35 void ?{}(string & s, const string & s2); 36 void ?{}(string & s, const string & s2, size_t maxlen); 36 37 void ?{}(string & s, string & s2); 37 38  - 
      
libcfa/src/collections/string_res.hfa
r11f65b3 r7abc3de 78 78 (s){ rhs, strlen(rhs) }; 79 79 } 80 80 static inline void ?{}(string_res & s, char c ) { 81 ?{}( s, &c, 1); 82 } 83 84 // Deleting the copy constructors makes the compiler reject an attempt to call/return by value 81 85 void ?{}(string_res & s, const string_res & s2) = void; 82 86 void ?{}(string_res & s, string_res & s2) = void; … … 86 90 static inline void ?{}(string_res & s, const string_res & src, StrResInitMode mode ) { 87 91 ?{}( s, src, mode, 0, size(src)); 92 } 93 static inline void ?{}(string_res & s, const string_res & src, StrResInitMode mode, size_t maxlen ) { 94 ?{}( s, src, mode, 0, (size(src) > maxlen)?maxlen:size(src) ); 88 95 } 89 96  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.