[Plib-cvs] CVS: plib/src/pui pu.cxx,1.44,1.45 pu.h,1.97,1.98 puFilePicker.cxx,1.23,1.24 puFileSelect
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-03-23 15:06:47
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv29048/src/pui Modified Files: pu.cxx pu.h puFilePicker.cxx puFileSelector.cxx puInput.cxx puLargeInput.cxx Log Message: Replaced some instances of "delete" with "delete []" Index: pu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.cxx,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- pu.cxx 16 Jan 2002 17:53:34 -0000 1.44 +++ pu.cxx 23 Mar 2002 15:06:44 -0000 1.45 @@ -459,7 +459,7 @@ void puSetPasteBuffer ( char *ch ) { - if ( input_paste_buffer ) delete input_paste_buffer ; + delete [] input_paste_buffer ; input_paste_buffer = new char [ strlen(ch) + 1 ] ; strcpy ( input_paste_buffer, ch ) ; } Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- pu.h 2 Mar 2002 18:20:09 -0000 1.97 +++ pu.h 23 Mar 2002 15:06:44 -0000 1.98 @@ -1345,7 +1345,7 @@ { if ( valid_data ) { - delete valid_data ; + delete [] valid_data ; valid_data = NULL ; } @@ -1365,7 +1365,7 @@ strcpy ( new_data, "\0" ) ; if ( valid_data ) strcat ( new_data, valid_data ) ; if ( data ) strcat ( new_data, data ) ; - delete valid_data ; + delete [] valid_data ; valid_data = new_data ; } @@ -1394,7 +1394,7 @@ ~puInput () { - if ( valid_data ) delete valid_data ; + delete [] valid_data ; } void invokeDownCallback ( void ) @@ -1625,7 +1625,7 @@ { if ( valid_data ) { - delete valid_data ; + delete [] valid_data ; valid_data = NULL ; } @@ -1645,7 +1645,7 @@ strcpy ( new_data, "\0" ) ; if ( valid_data ) strcat ( new_data, valid_data ) ; if ( data ) strcat ( new_data, data ) ; - delete valid_data ; + delete [] valid_data ; valid_data = new_data ; } Index: puFilePicker.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puFilePicker.cxx,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- puFilePicker.cxx 21 Dec 2001 14:27:36 -0000 1.23 +++ puFilePicker.cxx 23 Mar 2002 15:06:44 -0000 1.24 @@ -281,7 +281,7 @@ if ( files ) { for ( int i=0; i<num_files; i++ ) - delete files[i]; + delete [] files[i]; delete[] files; delete[] dflag; @@ -477,7 +477,7 @@ if ( files != NULL ) { for ( int i = 0 ; i < num_files ; i++ ) - delete files[i] ; + delete [] files[i] ; delete [] files ; delete [] dflag ; Index: puFileSelector.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puFileSelector.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- puFileSelector.cxx 16 Jan 2002 19:27:42 -0000 1.17 +++ puFileSelector.cxx 23 Mar 2002 15:06:44 -0000 1.18 @@ -318,7 +318,7 @@ if ( files ) { for ( int i=0; i<num_files; i++ ) - delete files[i]; + delete [] files[i]; delete[] files; delete[] dflag; @@ -557,7 +557,7 @@ if ( files != NULL ) { for ( int i = 0 ; i < num_files ; i++ ) - delete files[i] ; + delete [] files[i] ; delete [] files ; delete [] dflag ; Index: puInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puInput.cxx,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- puInput.cxx 16 Jan 2002 18:58:30 -0000 1.21 +++ puInput.cxx 23 Mar 2002 15:06:44 -0000 1.22 @@ -367,7 +367,7 @@ strcat ( getStringValue(), puGetPasteBuffer () ) ; strcat ( getStringValue(), p ) ; cursor_position += strlen ( puGetPasteBuffer () ) ; - delete p ; + delete [] p ; } break ; Index: puLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puLargeInput.cxx,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- puLargeInput.cxx 16 Jan 2002 19:55:51 -0000 1.29 +++ puLargeInput.cxx 23 Mar 2002 15:06:44 -0000 1.30 @@ -103,7 +103,7 @@ p [ select_start_position ] = '\0' ; strcat ( p, (text + select_end_position ) ) ; strcpy ( text, p ) ; - delete p ; + delete [] p ; wrapText () ; @@ -200,10 +200,10 @@ puLargeInput::~puLargeInput () [...71 lines suppressed...] break ; @@ -1119,7 +1119,7 @@ setText ( p ) ; setCursor ( temp_cursor + 1 ) ; - delete p ; + delete [] p ; break ; } @@ -1134,7 +1134,7 @@ // Wrap the text in "text" and put it in "wrapped_text" int l_len = strlen (text) ; - if ( wrapped_text ) delete wrapped_text ; + if ( wrapped_text ) delete [] wrapped_text ; wrapped_text = new char[l_len + 1] ; memcpy(wrapped_text, text, l_len + 1) ; |