equal
deleted
inserted
replaced
321 for (int i = 0; i < overflowSize; ++i) |
321 for (int i = 0; i < overflowSize; ++i) |
322 copy.append(overflow[i]); |
322 copy.append(overflow[i]); |
323 |
323 |
324 return copy; |
324 return copy; |
325 } |
325 } |
|
326 static List* staticEmptyList = 0; |
|
327 |
|
328 struct listCleaner { |
|
329 ~listCleaner() { |
|
330 delete staticEmptyList; |
|
331 staticEmptyList = 0; |
|
332 } |
|
333 }; |
|
334 |
|
335 static listCleaner cleanList; |
326 |
336 |
327 const List& List::empty() |
337 const List& List::empty() |
328 { |
338 { |
329 static List* staticEmptyList = new List; |
339 if(!staticEmptyList) |
|
340 { |
|
341 staticEmptyList = new List; |
|
342 } |
330 return *staticEmptyList; |
343 return *staticEmptyList; |
331 } |
344 } |
332 |
345 |
333 List &List::operator=(const List &b) |
346 List &List::operator=(const List &b) |
334 { |
347 { |