Browse Source

There is no benefit to the hsFopen macro

Michael Hansen 11 years ago
parent
commit
ce53a71990
  1. 2
      Sources/Plasma/CoreLib/HeadSpin.h
  2. 3
      Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp
  3. 4
      Sources/Tools/MaxExport/plExportLogErrorMsg.cpp

2
Sources/Plasma/CoreLib/HeadSpin.h

@ -366,8 +366,6 @@ inline float hsRadiansToDegrees(float rad) { return float(rad * (180 / M_PI)); }
# define ALIGN(n) __atribute__(aligned(n)) # define ALIGN(n) __atribute__(aligned(n))
#endif #endif
#define hsFopen(name, mode) fopen(name, mode)
/************************ Debug/Error Macros **************************/ /************************ Debug/Error Macros **************************/
typedef void (*hsDebugMessageProc)(const char message[]); typedef void (*hsDebugMessageProc)(const char message[]);

3
Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp

@ -765,8 +765,7 @@ void plInputInterfaceMgr::WriteKeyMap( void )
#ifdef PLASMA_EXTERNAL_RELEASE #ifdef PLASMA_EXTERNAL_RELEASE
return; return;
#endif #endif
FILE* gKeyFile = 0; FILE* gKeyFile = fopen("init\\keyboard.fni", "wt");
gKeyFile = hsFopen( "init\\keyboard.fni", "wt" );
if (gKeyFile) if (gKeyFile)
{ {

4
Sources/Tools/MaxExport/plExportLogErrorMsg.cpp

@ -74,7 +74,7 @@ plExportLogErrorMsg::~plExportLogErrorMsg()
#ifdef ERRORLOG_ALWAYS_WRITE_SOMETHING #ifdef ERRORLOG_ALWAYS_WRITE_SOMETHING
else else
{ {
fErrfile = hsFopen(fErrfile_name, "wt"); fErrfile = fopen(fErrfile_name, "wt");
setbuf(fErrfile, nil); setbuf(fErrfile, nil);
fprintf(fErrfile, "No errors found! Good job."); fprintf(fErrfile, "No errors found! Good job.");
fclose(fErrfile); fclose(fErrfile);
@ -170,7 +170,7 @@ void plExportLogErrorMsg::IWriteErrorFile(const char* label, const char* msg)
if ( !fErrfile ) if ( !fErrfile )
{ {
// must be the first write... open the error file // must be the first write... open the error file
fErrfile = hsFopen(fErrfile_name, "wt"); fErrfile = fopen(fErrfile_name, "wt");
setbuf(fErrfile, nil); setbuf(fErrfile, nil);
fNumberErrors = 0; fNumberErrors = 0;
} }

Loading…
Cancel
Save