From: <rel...@us...> - 2009-08-04 17:49:04
|
Revision: 313 http://modplug.svn.sourceforge.net/modplug/?rev=313&view=rev Author: relabsoluness Date: 2009-08-04 17:48:52 +0000 (Tue, 04 Aug 2009) Log Message: ----------- [Ref] Minor tweaks (removed some compiler warnings, use of note constants) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-08-03 19:20:23 UTC (rev 312) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-08-04 17:48:52 UTC (rev 313) @@ -531,7 +531,7 @@ } if (c == ' ') { - if (m_nNote < 119) m_nNote++; + if (m_nNote < NOTE_MAX - 1) m_nNote++; InvalidateRect(NULL, FALSE); PlayNote(m_nNote); } @@ -582,7 +582,7 @@ { case VK_RIGHT: if (!m_bIns) { m_bIns = TRUE; bRedraw = TRUE; } else - if (m_nNote < 119) { m_nNote++; m_bIns = FALSE; bRedraw = TRUE; } + if (m_nNote < NOTE_MAX - 1) { m_nNote++; m_bIns = FALSE; bRedraw = TRUE; } break; case VK_LEFT: if (m_bIns) { m_bIns = FALSE; bRedraw = TRUE; } else @@ -592,7 +592,7 @@ if (m_nNote > 0) { m_nNote--; bRedraw = TRUE; } break; case VK_DOWN: - if (m_nNote < 119) { m_nNote++; bRedraw = TRUE; } + if (m_nNote < NOTE_MAX - 1) { m_nNote++; bRedraw = TRUE; } break; case VK_PRIOR: if (m_nNote > 3) { m_nNote-=3; bRedraw = TRUE; } else @@ -600,7 +600,7 @@ break; case VK_NEXT: if (m_nNote+3 < NOTE_MAX) { m_nNote+=3; bRedraw = TRUE; } else - if (m_nNote < 119) { m_nNote = 119; bRedraw = TRUE; } + if (m_nNote < NOTE_MAX - 1) { m_nNote = NOTE_MAX - 1; bRedraw = TRUE; } break; case VK_TAB: return true; @@ -2130,7 +2130,7 @@ if ((!IsLocked()) && (penv)) { int n = m_ComboPPC.GetCurSel(); - if ((n >= 0) && (n <= 119)) { + if ((n >= 0) && (n <= NOTE_MAX - 1)) { if (penv->nPPC != n) { m_pModDoc->SetModified(); penv->nPPC = n; Modified: trunk/OpenMPT/mptrack/Moddoc.h =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h 2009-08-03 19:20:23 UTC (rev 312) +++ trunk/OpenMPT/mptrack/Moddoc.h 2009-08-04 17:48:52 UTC (rev 313) @@ -144,7 +144,7 @@ void InitPlayer(); CSoundFile *GetSoundFile() { return &m_SndFile; } void SetPause(BOOL bPause) { m_bPaused = bPause; } - void SetModified(BOOL bModified=TRUE) { SetModifiedFlag(bModified); bModifiedAutosave = bModified; } + void SetModified(BOOL bModified=TRUE) { SetModifiedFlag(bModified); bModifiedAutosave = (bModified != FALSE); } BOOL ModifiedSinceLastAutosave() { bool bRetval = bModifiedAutosave; bModifiedAutosave = false; return bRetval; } // return "IsModified" value and reset it until the next SetModified() (as this is only used for polling) void SetShowSaveDialog(bool b) {m_ShowSavedialog = b;} void PostMessageToAllViews(UINT uMsg, WPARAM wParam=0, LPARAM lParam=0); Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-08-03 19:20:23 UTC (rev 312) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-08-04 17:48:52 UTC (rev 313) @@ -705,7 +705,7 @@ // Load plugins only when m_pModDoc != 0. (can be == 0 for example when examining module samples in treeview. CString sNotFound; - BOOL bSearchIDs[MAX_MIXPLUGINS] = {false}; + bool bSearchIDs[MAX_MIXPLUGINS] = {false}; UINT iShowNotFound = 0; if (gpMixPluginCreateProc && GetpModDoc()) Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2009-08-03 19:20:23 UTC (rev 312) +++ trunk/OpenMPT/soundlib/Sndfile.h 2009-08-04 17:48:52 UTC (rev 313) @@ -488,6 +488,7 @@ // -------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------- +#pragma warning(disable : 4324) //structure was padded due to __declspec(align()) // Channel Struct typedef struct __declspec(align(32)) _MODCHANNEL @@ -1266,6 +1267,9 @@ long GetSampleOffset(); }; +#pragma warning(default : 4324) //structure was padded due to __declspec(align()) + + inline uint32 MODINSTRUMENT::GetSampleRate(const MODTYPE type) const //------------------------------------------------------------------ { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |