summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-13 10:14:29 +0000
committerrubidium <rubidium@openttd.org>2010-05-13 10:14:29 +0000
commit062dd0e24c283f210216ede06bbde0ed72c7ed25 (patch)
treea917e975f1f5d4c144ecad2c799cf58764a1f592 /src/music
parenta2d6961ab3c9aa43b95dfe9fa4699d290e5627e2 (diff)
downloadopenttd-062dd0e24c283f210216ede06bbde0ed72c7ed25.tar.xz
(svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int
Diffstat (limited to 'src/music')
-rw-r--r--src/music/qtmidi.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/music/qtmidi.cpp b/src/music/qtmidi.cpp
index e3e32e470..844fd190a 100644
--- a/src/music/qtmidi.cpp
+++ b/src/music/qtmidi.cpp
@@ -41,9 +41,7 @@
static FMusicDriver_QtMidi iFMusicDriver_QtMidi;
-enum {
- midiType = 'Midi' ///< OSType code for MIDI songs.
-};
+static const uint MIDI_TYPE = 'Midi' ///< OSType code for MIDI songs.
/**
@@ -61,9 +59,9 @@ static void SetMIDITypeIfNeeded(const FSRef *ref)
if (noErr != FSGetCatalogInfo(ref, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo, &catalogInfo, NULL, NULL, NULL)) return;
if (!(catalogInfo.nodeFlags & kFSNodeIsDirectoryMask)) {
FileInfo * const info = (FileInfo *) catalogInfo.finderInfo;
- if (info->fileType != midiType && !(info->finderFlags & kIsAlias)) {
+ if (info->fileType != MIDI_TYPE && !(info->finderFlags & kIsAlias)) {
OSErr e;
- info->fileType = midiType;
+ info->fileType = MIDI_TYPE;
e = FSSetCatalogInfo(ref, kFSCatInfoFinderInfo, &catalogInfo);
if (e == noErr) {
DEBUG(driver, 3, "qtmidi: changed filetype to 'Midi'");
@@ -161,7 +159,7 @@ static void InitQuickTimeIfNeeded()
/** Possible states of the QuickTime music driver. */
-enum {
+enum QTStates {
QT_STATE_IDLE, ///< No file loaded.
QT_STATE_PLAY, ///< File loaded, playing.
QT_STATE_STOP, ///< File loaded, stopped.