|
From: <pst...@us...> - 2008-03-30 14:45:45
|
Revision: 369
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=369&view=rev
Author: pstieber
Date: 2008-03-30 07:45:43 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
Removed the startup file name from the global variables because
it was only used by the project class in one function.
Modified Paths:
--------------
trunk/jazz/src/Globals.cpp
trunk/jazz/src/Globals.h
trunk/jazz/src/Project.cpp
Modified: trunk/jazz/src/Globals.cpp
===================================================================
--- trunk/jazz/src/Globals.cpp 2008-03-30 14:35:30 UTC (rev 368)
+++ trunk/jazz/src/Globals.cpp 2008-03-30 14:45:43 UTC (rev 369)
@@ -31,8 +31,6 @@
using namespace std;
-string gpStartUpSong;
-
tConfig* gpConfig = 0;
JZSong* gpSong = 0;
Modified: trunk/jazz/src/Globals.h
===================================================================
--- trunk/jazz/src/Globals.h 2008-03-30 14:35:30 UTC (rev 368)
+++ trunk/jazz/src/Globals.h 2008-03-30 14:45:43 UTC (rev 369)
@@ -46,7 +46,6 @@
};
extern tConfig* gpConfig;
-extern std::string gpStartUpSong;
extern JZSong* gpSong;
extern JZSynth* gpSynth;
extern JZPlayer* gpMidiPlayer;
Modified: trunk/jazz/src/Project.cpp
===================================================================
--- trunk/jazz/src/Project.cpp 2008-03-30 14:35:30 UTC (rev 368)
+++ trunk/jazz/src/Project.cpp 2008-03-30 14:45:43 UTC (rev 369)
@@ -294,28 +294,25 @@
}
}
-
// Attempt to load the song given on command line or the file specified in
// the configuration file.
+ string StartUpSong;
opt = GetOptionIndex( "-f" ) + 1;
if (opt && (wxTheApp->argc > opt))
{
- gpStartUpSong = wxTheApp->argv[opt];
+ StartUpSong = wxTheApp->argv[opt];
}
else
{
- gpStartUpSong = mpConfig->StrValue(C_StartUpSong);
+ StartUpSong = mpConfig->StrValue(C_StartUpSong);
}
- FILE* fd = fopen(gpStartUpSong.c_str(), "r");
- if (fd)
+
+ FILE* pFd = fopen(StartUpSong.c_str(), "r");
+ if (pFd)
{
- fclose(fd);
+ fclose(pFd);
JZStandardRead Io;
- Read(Io, gpStartUpSong.c_str());
-// if (gpStartUpSong == string("jazz.mid"))
-// {
-// lasts = gpStartUpSong;
-// }
+ Read(Io, StartUpSong.c_str());
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|