Changeset 1733184 for libcfa/src/containers
- Timestamp:
- Nov 15, 2021, 4:26:56 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 01db301
- Parents:
- 4e8df745
- Location:
- libcfa/src/containers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/containers/string_res.cfa
r4e8df745 r1733184 390 390 } 391 391 392 static voidassign_(string_res &this, const char* buffer, size_t bsize, const string_res & valSrc) {392 static string_res & assign_(string_res &this, const char* buffer, size_t bsize, const string_res & valSrc) { 393 393 394 394 // traverse the incumbent share-edit set (SES) to recover the range of a base string to which `this` belongs … … 478 478 &pasting.Handle, bsize); 479 479 } 480 } 481 482 void assign(string_res &this, const char* buffer, size_t bsize) { 483 assign_(this, buffer, bsize, *0p); 484 } 485 486 void ?=?(string_res &s, char other) { 487 assign(s, &other, 1); 480 481 return this; 482 } 483 484 string_res & assign(string_res &this, const char* buffer, size_t bsize) { 485 return assign_(this, buffer, bsize, *0p); 486 } 487 488 string_res & ?=?(string_res &s, char other) { 489 return assign(s, &other, 1); 488 490 } 489 491 490 492 // Copy assignment operator 491 void?=?(string_res & this, const string_res & rhs) with( this ) {492 assign_(this, rhs.Handle.s, rhs.Handle.lnth, rhs);493 } 494 495 void?=?(string_res & this, string_res & rhs) with( this ) {493 string_res & ?=?(string_res & this, const string_res & rhs) with( this ) { 494 return assign_(this, rhs.Handle.s, rhs.Handle.lnth, rhs); 495 } 496 497 string_res & ?=?(string_res & this, string_res & rhs) with( this ) { 496 498 const string_res & rhs2 = rhs; 497 this = rhs2;499 return this = rhs2; 498 500 } 499 501 … … 780 782 // allocation, the garbage collection routine is called. 781 783 782 static char * __attribute__((noinline))VbyteAlloc( VbyteHeap & this, int size ) with(this) {784 static char * VbyteAlloc( VbyteHeap & this, int size ) with(this) { 783 785 #ifdef VbyteDebug 784 786 serr | "enter:VbyteAlloc, size:" | size; -
libcfa/src/containers/string_res.hfa
r4e8df745 r1733184 87 87 } 88 88 89 voidassign(string_res &s, const char* buffer, size_t bsize); // copy specific length from buffer90 static inline void?=?(string_res &s, const char* other) { // copy from string literal (NULL-terminated)91 assign(s, other, strlen(other));89 string_res & assign(string_res &s, const char* buffer, size_t bsize); // copy specific length from buffer 90 static inline string_res & ?=?(string_res &s, const char* other) { // copy from string literal (NULL-terminated) 91 return assign(s, other, strlen(other)); 92 92 } 93 void?=?(string_res &s, const string_res &other);94 void?=?(string_res &s, string_res &other);95 void?=?(string_res &s, char other);93 string_res & ?=?(string_res &s, const string_res &other); 94 string_res & ?=?(string_res &s, string_res &other); 95 string_res & ?=?(string_res &s, char other); 96 96 97 97 void ^?{}(string_res &s);
Note: See TracChangeset
for help on using the changeset viewer.