From 5a922e3a42c1400e118538ec8e990c59fed7b1d3 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:48:18 +0300 Subject: [PATCH] Remove useless function --- Editor/Sector Summary.cpp | 3 ++- Laptop/files.cpp | 1 - Laptop/finances.cpp | 1 - Laptop/history.cpp | 1 - Laptop/laptop.cpp | 4 ---- Standard Gaming Platform/FileMan.cpp | 5 ----- Standard Gaming Platform/FileMan.h | 2 -- 7 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Editor/Sector Summary.cpp b/Editor/Sector Summary.cpp index b7174247..9c328cfa 100644 --- a/Editor/Sector Summary.cpp +++ b/Editor/Sector Summary.cpp @@ -2177,7 +2177,8 @@ void SummarySaveMapCallback( GUI_BUTTON *btn, INT32 reason ) { CHAR8 filename[40]; sprintf( filename, "MAPS\\%S", gszDisplayName ); - FileClearAttributes( filename ); + // Other call sites have replaced this with FileDelete(); for VFS, should we do the same here? + //FileClearAttributes( filename ); } if( ExternalSaveMap( gszDisplayName ) ) { diff --git a/Laptop/files.cpp b/Laptop/files.cpp index feb80271..3de647b9 100644 --- a/Laptop/files.cpp +++ b/Laptop/files.cpp @@ -476,7 +476,6 @@ void GameInitFiles( ) { if ( FileExists( FILES_DAT_FILE ) == TRUE ) { - FileClearAttributes( FILES_DAT_FILE ); FileDelete( FILES_DAT_FILE ); } diff --git a/Laptop/finances.cpp b/Laptop/finances.cpp index 57c8acba..ac542863 100644 --- a/Laptop/finances.cpp +++ b/Laptop/finances.cpp @@ -460,7 +460,6 @@ void GameInitFinances() // unlink Finances data file if( (FileExists( FINANCES_DATA_FILE ) ) ) { - FileClearAttributes( FINANCES_DATA_FILE ); FileDelete( FINANCES_DATA_FILE ); } GetBalanceFromDisk( ); diff --git a/Laptop/history.cpp b/Laptop/history.cpp index 6067098d..3ca4a8c4 100644 --- a/Laptop/history.cpp +++ b/Laptop/history.cpp @@ -227,7 +227,6 @@ void GameInitHistory() if( ( FileExists( HISTORY_DATA_FILE ) ) ) { // unlink history file - FileClearAttributes( HISTORY_DATA_FILE ); FileDelete( HISTORY_DATA_FILE ); } diff --git a/Laptop/laptop.cpp b/Laptop/laptop.cpp index 33e95d76..00c2f161 100644 --- a/Laptop/laptop.cpp +++ b/Laptop/laptop.cpp @@ -7136,28 +7136,24 @@ void ClearOutTempLaptopFiles( void ) // file file if ( (FileExists( "files.dat" ) == TRUE ) ) { - FileClearAttributes( "files.dat" ); FileDelete( "files.dat" ); } // finances if ( (FileExists( "finances.dat" ) == TRUE ) ) { - FileClearAttributes( "finances.dat" ); FileDelete( "finances.dat" ); } // email if ( (FileExists( "email.dat" ) == TRUE ) ) { - FileClearAttributes( "email.dat" ); FileDelete( "email.dat" ); } // history if ( (FileExists( "history.dat" ) == TRUE ) ) { - FileClearAttributes( "history.dat" ); FileDelete( "history.dat" ); } } diff --git a/Standard Gaming Platform/FileMan.cpp b/Standard Gaming Platform/FileMan.cpp index 3b57cd69..9e4c3804 100644 --- a/Standard Gaming Platform/FileMan.cpp +++ b/Standard Gaming Platform/FileMan.cpp @@ -1472,11 +1472,6 @@ UINT32 FileGetAttributes( STR strFilename ) return( uiFileAttrib ); } -BOOLEAN FileClearAttributes( STR strFilename ) -{ - return TRUE; -} - //returns true if at end of file, else false BOOLEAN FileCheckEndOfFile( HWFILE hFile ) diff --git a/Standard Gaming Platform/FileMan.h b/Standard Gaming Platform/FileMan.h index a1350eaa..e5ba0854 100644 --- a/Standard Gaming Platform/FileMan.h +++ b/Standard Gaming Platform/FileMan.h @@ -156,8 +156,6 @@ BOOLEAN FileMove(STR strOldName, STR strNewName); BOOLEAN FileSetAttributes( STR filename, UINT32 uiNewAttribs ); UINT32 FileGetAttributes( STR filename ); -BOOLEAN FileClearAttributes( STR strFilename ); - //returns true if at end of file, else false BOOLEAN FileCheckEndOfFile( HWFILE hFile );