equal
deleted
inserted
replaced
41 //------------------------------setstr----------------------------------------- |
41 //------------------------------setstr----------------------------------------- |
42 // Create a string with a printable representation of a set. |
42 // Create a string with a printable representation of a set. |
43 // The caller must deallocate the string. |
43 // The caller must deallocate the string. |
44 char *Set::setstr() const |
44 char *Set::setstr() const |
45 { |
45 { |
46 if( this == NULL ) return os::strdup("{no set}"); |
|
47 Set &set = clone(); // Virtually copy the basic set. |
46 Set &set = clone(); // Virtually copy the basic set. |
48 set.Sort(); // Sort elements for in-order retrieval |
47 set.Sort(); // Sort elements for in-order retrieval |
49 |
48 |
50 uint len = 128; // Total string space |
49 uint len = 128; // Total string space |
51 char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space |
50 char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space |