@@ -57,7 +57,6 @@ module stdlib_stringlist
57
57
58
58
contains
59
59
private
60
- procedure :: copy = > create_copy
61
60
62
61
procedure , public :: clear = > clear_list
63
62
@@ -208,17 +207,6 @@ pure function backward_index( idx )
208
207
209
208
end function backward_index
210
209
211
- ! copy
212
-
213
- ! > Returns a deep copy of the stringlist 'original'
214
- pure function create_copy ( original )
215
- class(stringlist_type), intent (in ) :: original
216
- type (stringlist_type) :: create_copy
217
-
218
- create_copy = original
219
-
220
- end function create_copy
221
-
222
210
! concatenation operator:
223
211
224
212
! > Appends character scalar 'string' to the stringlist 'list'
@@ -239,7 +227,7 @@ function append_string( list, string )
239
227
type (string_type), intent (in ) :: string
240
228
type (stringlist_type) :: append_string
241
229
242
- append_string = list% copy()
230
+ append_string = list ! Intent: creating a full, deep copy
243
231
call append_string% insert_at( list_tail, string )
244
232
245
233
end function append_string
@@ -262,7 +250,7 @@ function prepend_string( string, list )
262
250
type (stringlist_type), intent (in ) :: list
263
251
type (stringlist_type) :: prepend_string
264
252
265
- prepend_string = list% copy()
253
+ prepend_string = list ! Intent: creating a full, deep copy
266
254
call prepend_string% insert_at( list_head, string )
267
255
268
256
end function prepend_string
@@ -274,7 +262,7 @@ function append_stringlist( list, slist )
274
262
type (stringlist_type), intent (in ) :: slist
275
263
type (stringlist_type) :: append_stringlist
276
264
277
- append_stringlist = list% copy()
265
+ append_stringlist = list ! Intent: creating a full, deep copy
278
266
call append_stringlist% insert_at( list_tail, slist )
279
267
280
268
end function append_stringlist
@@ -286,7 +274,7 @@ function append_carray( list, carray )
286
274
character (len=* ), dimension (:), intent (in ) :: carray
287
275
type (stringlist_type) :: append_carray
288
276
289
- append_carray = list% copy()
277
+ append_carray = list ! Intent: creating a full, deep copy
290
278
call append_carray% insert_at( list_tail, carray )
291
279
292
280
end function append_carray
@@ -298,7 +286,7 @@ function append_sarray( list, sarray )
298
286
type (string_type), dimension (:), intent (in ) :: sarray
299
287
type (stringlist_type) :: append_sarray
300
288
301
- append_sarray = list% copy()
289
+ append_sarray = list ! Intent: creating a full, deep copy
302
290
call append_sarray% insert_at( list_tail, sarray )
303
291
304
292
end function append_sarray
@@ -310,7 +298,7 @@ function prepend_carray( carray, list )
310
298
type (stringlist_type), intent (in ) :: list
311
299
type (stringlist_type) :: prepend_carray
312
300
313
- prepend_carray = list% copy()
301
+ prepend_carray = list ! Intent: creating a full, deep copy
314
302
call prepend_carray% insert_at( list_head, carray )
315
303
316
304
end function prepend_carray
@@ -322,7 +310,7 @@ function prepend_sarray( sarray, list )
322
310
type (stringlist_type), intent (in ) :: list
323
311
type (stringlist_type) :: prepend_sarray
324
312
325
- prepend_sarray = list% copy()
313
+ prepend_sarray = list ! Intent: creating a full, deep copy
326
314
call prepend_sarray% insert_at( list_head, sarray )
327
315
328
316
end function prepend_sarray
0 commit comments