From: <man...@us...> - 2013-06-27 15:00:15
|
Revision: 2416 http://sourceforge.net/p/modplug/code/2416 Author: manxorist Date: 2013-06-27 15:00:03 +0000 (Thu, 27 Jun 2013) Log Message: ----------- [Ref] Remove all using namespace std; and using std::*; Modified Paths: -------------- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AutoSaver.cpp trunk/OpenMPT/mptrack/Autotune.cpp trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp trunk/OpenMPT/mptrack/CloseMainDialog.cpp trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/ExceptionHandler.cpp trunk/OpenMPT/mptrack/HyperEdit.h trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/ModConvert.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/View_gen.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/dlg_misc.h trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/mptrack/tagging.cpp trunk/OpenMPT/mptrack/tagging.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/tuningCollection.cpp Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -577,7 +577,7 @@ CString name; - vector<CVstPlugin *> inputPlugs; + std::vector<CVstPlugin *> inputPlugs; m_VstPlugin.GetInputPlugList(inputPlugs); for(size_t nPlug=0; nPlug < inputPlugs.size(); nPlug++) { @@ -585,7 +585,7 @@ m_InputMenu.AppendMenu(MF_STRING, ID_PLUGSELECT + inputPlugs[nPlug]->m_nSlot, name); } - vector<CHANNELINDEX> inputChannels; + std::vector<CHANNELINDEX> inputChannels; m_VstPlugin.GetInputChannelList(inputChannels); for(size_t nChn=0; nChn<inputChannels.size(); nChn++) { @@ -597,7 +597,7 @@ m_InputMenu.AppendMenu(MF_STRING, NULL, name); } - vector<INSTRUMENTINDEX> inputInstruments; + std::vector<INSTRUMENTINDEX> inputInstruments; m_VstPlugin.GetInputInstrumentList(inputInstruments); for(size_t nIns = 0; nIns<inputInstruments.size(); nIns++) { Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp =================================================================== --- trunk/OpenMPT/mptrack/AutoSaver.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -310,7 +310,7 @@ CFileFind finder; BOOL bResult = finder.FindFile(searchPattern); - vector<CString> foundfiles; + std::vector<CString> foundfiles; while(bResult) { Modified: trunk/OpenMPT/mptrack/Autotune.cpp =================================================================== --- trunk/OpenMPT/mptrack/Autotune.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Autotune.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -164,7 +164,7 @@ const SmpLength processLength = sampleLength - maxShift; // Histogram for all notes. - vector<uint64> autocorrHistogram(historyBins, 0); + std::vector<uint64> autocorrHistogram(historyBins, 0); // Do autocorrelation and save results in a note histogram (restriced to one octave). for(int note = autocorrStartNote, noteBin = note; note < autocorrEndNote; note++, noteBin++) @@ -190,7 +190,7 @@ } // Interpolate the histogram... - vector<uint64> interpolatedHistogram(historyBins, 0); + std::vector<uint64> interpolatedHistogram(historyBins, 0); for(int i = 0; i < historyBins; i++) { interpolatedHistogram[i] = autocorrHistogram[i]; Modified: trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -198,7 +198,7 @@ CriticalSection cs; //Creating new order-vector for ReArrangeChannels. - vector<CHANNELINDEX> newChnOrder; + std::vector<CHANNELINDEX> newChnOrder; for(CHANNELINDEX nChn = 0; nChn < nChannels; nChn++) { newChnOrder.push_back(newpat[nChn]); Modified: trunk/OpenMPT/mptrack/CloseMainDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/CloseMainDialog.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/CloseMainDialog.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -51,8 +51,8 @@ CheckDlgButton(IDC_CHECK1, BST_CHECKED); - vector<CModDoc *> documents = theApp.GetOpenDocuments(); - for(vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) + std::vector<CModDoc *> documents = theApp.GetOpenDocuments(); + for(std::vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) { CModDoc *pModDoc = *doc; if(pModDoc->IsModified()) Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -192,7 +192,7 @@ // Note s[0] = 0; - string temp = sndFile.GetNoteName(nPos+1, m_nInstrument); + std::string temp = sndFile.GetNoteName(nPos+1, m_nInstrument); temp.resize(4); if ((nPos >= 0) && (nPos < NOTE_MAX)) wsprintf(s, "%s", temp.c_str()); rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont); @@ -207,7 +207,7 @@ UINT n = pIns->NoteMap[nPos]; if(ModCommand::IsNote(n)) { - string temp = sndFile.GetNoteName(n, m_nInstrument); + std::string temp = sndFile.GetNoteName(n, m_nInstrument); temp.resize(4); wsprintf(s, "%s", temp.c_str()); } else @@ -1530,7 +1530,7 @@ // Pitch/Tempo lock { const CModSpecifications& specs = m_sndFile.GetModSpecifications(); - string str = string("Tempo range: ") + Stringify(specs.tempoMin) + string(" - ") + Stringify(specs.tempoMax); + std::string str = std::string("Tempo range: ") + Stringify(specs.tempoMin) + std::string(" - ") + Stringify(specs.tempoMax); if(str.size() >= 250) str.resize(250); strcpy(pszText, str.c_str()); return TRUE; @@ -2570,7 +2570,7 @@ //Case: Chosen tuning editor to be displayed. //Creating vector for the CTuningDialog. - vector<CTuningCollection*> v; + std::vector<CTuningCollection*> v; v.push_back(&m_sndFile.GetBuiltInTunings()); v.push_back(&m_sndFile.GetLocalTunings()); v.push_back(&m_sndFile.GetTuneSpecificTunings()); Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -826,7 +826,7 @@ return; bool success = false; // Has this pattern been duplicated already? (for multiselect) - vector<PATTERNINDEX> patReplaceIndex(sndFile.Patterns.Size(), PATTERNINDEX_INVALID); + std::vector<PATTERNINDEX> patReplaceIndex(sndFile.Patterns.Size(), PATTERNINDEX_INVALID); for(ORDERINDEX i = 0; i <= insertCount; i++) { Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -23,8 +23,6 @@ #include "EffectInfo.h" #include <string> -using std::string; - // Headers #define ROWHDR_WIDTH 32 // Row header #define COLHDR_HEIGHT 16 // Column header @@ -405,7 +403,7 @@ { if(pTuning) { // Drawing custom note names - string noteStr = pTuning->GetNoteName(static_cast<CTuningBase::NOTEINDEXTYPE>(note-NOTE_MIDDLEC)); + std::string noteStr = pTuning->GetNoteName(static_cast<CTuningBase::NOTEINDEXTYPE>(note-NOTE_MIDDLEC)); if(noteStr.size() < 3) noteStr.resize(3, ' '); Modified: trunk/OpenMPT/mptrack/ExceptionHandler.cpp =================================================================== --- trunk/OpenMPT/mptrack/ExceptionHandler.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/ExceptionHandler.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -86,8 +86,8 @@ // Rescue modified files... int numFiles = 0; - vector<CModDoc *> documents = theApp.GetOpenDocuments(); - for(vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) + std::vector<CModDoc *> documents = theApp.GetOpenDocuments(); + for(std::vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) { CModDoc *pModDoc = *doc; if(pModDoc->IsModified() && pModDoc->GetSoundFile() != nullptr) Modified: trunk/OpenMPT/mptrack/HyperEdit.h =================================================================== --- trunk/OpenMPT/mptrack/HyperEdit.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/HyperEdit.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -35,8 +35,6 @@ #include <vector> -using namespace std; - // // This structure holds the starting offset and length for each token // located inside the buffer for the control. We use this data inside @@ -46,7 +44,7 @@ struct _TOKEN_OFFSET{ WORD iStart; // WORD iLength; -}; typedef vector<_TOKEN_OFFSET> OFFSETS; +}; typedef std::vector<_TOKEN_OFFSET> OFFSETS; // CHyperEdit control interface Modified: trunk/OpenMPT/mptrack/MIDIMapping.h =================================================================== --- trunk/OpenMPT/mptrack/MIDIMapping.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/MIDIMapping.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -12,7 +12,6 @@ #include <vector> #include <algorithm> -using std::vector; //========================= @@ -82,7 +81,7 @@ //=============== { public: - typedef vector<CMIDIMappingDirective>::const_iterator const_iterator; + typedef std::vector<CMIDIMappingDirective>::const_iterator const_iterator; CMIDIMapper(CSoundFile& sndfile) : m_rSndFile(sndfile) {} //If mapping found: @@ -121,5 +120,5 @@ private: CSoundFile& m_rSndFile; - vector<CMIDIMappingDirective> m_Directives; + std::vector<CMIDIMappingDirective> m_Directives; }; Modified: trunk/OpenMPT/mptrack/MPTHacks.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTHacks.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/MPTHacks.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -253,7 +253,7 @@ foundHacks = true; if(autofix) { - vector<bool> usedChannels; + std::vector<bool> usedChannels; CheckUsedChannels(usedChannels); RemoveChannels(usedChannels); // REQUIRES (INTELLIGENT) AUTOFIX Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mod2wave.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -780,7 +780,7 @@ UINT lRead = m_pSndFile->ReadInterleaved(buffer, sizeof(buffer)/(m_pSndFile->m_MixerSettings.gnChannels*m_pSndFile->m_MixerSettings.GetBitsPerSample()/8)); // Process cue points (add base offset), if there are any to process. - vector<PatternCuePoint>::reverse_iterator iter; + std::vector<PatternCuePoint>::reverse_iterator iter; for(iter = m_pSndFile->m_PatternCuePoints.rbegin(); iter != m_pSndFile->m_PatternCuePoints.rend(); ++iter) { if(iter->processed) @@ -922,7 +922,7 @@ fwrite(&cuehdr, 1, sizeof(WavCueHeader), f); // Write all cue points - vector<PatternCuePoint>::const_iterator iter; + std::vector<PatternCuePoint>::const_iterator iter; DWORD num = 0; for(iter = m_pSndFile->m_PatternCuePoints.begin(); iter != m_pSndFile->m_PatternCuePoints.end(); ++iter, num++) { Modified: trunk/OpenMPT/mptrack/ModConvert.cpp =================================================================== --- trunk/OpenMPT/mptrack/ModConvert.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/ModConvert.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -175,8 +175,8 @@ ModCommand *m = m_SndFile.Patterns[pat]; // This is used for -> MOD/XM conversion - vector<vector<ModCommand::PARAM> > effMemory(GetNumChannels()); - vector<ModCommand::VOL> volMemory(GetNumChannels(), 0); + std::vector<std::vector<ModCommand::PARAM> > effMemory(GetNumChannels()); + std::vector<ModCommand::VOL> volMemory(GetNumChannels(), 0); for(size_t i = 0; i < GetNumChannels(); i++) { effMemory[i].resize(MAX_EFFECTS, 0); Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -1689,10 +1689,10 @@ int nRenderPasses = 1; // Channel mode - vector<bool> usedChannels; - vector<ChannelFlags> channelFlags; + std::vector<bool> usedChannels; + std::vector<ChannelFlags> channelFlags; // Instrument mode - vector<bool> instrMuteState; + std::vector<bool> instrMuteState; // Channel mode: save song in multiple wav files (one for each enabled channels) if(wsdlg.m_bChannelMode) Modified: trunk/OpenMPT/mptrack/Moddoc.h =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Moddoc.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -262,8 +262,8 @@ CSampleUndo &GetSampleUndo() { return m_SampleUndo; } SplitKeyboardSettings &GetSplitKeyboardSettings() { return m_SplitKeyboardSettings; } - vector<FileHistory> &GetFileHistory() { return m_FileHistory; } - const vector<FileHistory> &GetFileHistory() const { return m_FileHistory; } + std::vector<FileHistory> &GetFileHistory() { return m_FileHistory; } + const std::vector<FileHistory> &GetFileHistory() const { return m_FileHistory; } time_t GetCreationTime() const { return m_creationTime; } // operations @@ -271,17 +271,17 @@ bool ChangeModType(MODTYPE wType); bool ChangeNumChannels(CHANNELINDEX nNewChannels, const bool showCancelInRemoveDlg = true); - bool RemoveChannels(const vector<bool> &keepMask); - CHANNELINDEX ReArrangeChannels(const vector<CHANNELINDEX> &fromToArray, const bool createUndoPoint = true); - void CheckUsedChannels(vector<bool> &usedMask, CHANNELINDEX maxRemoveCount = MAX_BASECHANNELS) const; + bool RemoveChannels(const std::vector<bool> &keepMask); + CHANNELINDEX ReArrangeChannels(const std::vector<CHANNELINDEX> &fromToArray, const bool createUndoPoint = true); + void CheckUsedChannels(std::vector<bool> &usedMask, CHANNELINDEX maxRemoveCount = MAX_BASECHANNELS) const; - SAMPLEINDEX ReArrangeSamples(const vector<SAMPLEINDEX> &newOrder); + SAMPLEINDEX ReArrangeSamples(const std::vector<SAMPLEINDEX> &newOrder); - INSTRUMENTINDEX ReArrangeInstruments(const vector<INSTRUMENTINDEX> &newOrder, deleteInstrumentSamples removeSamples = doNoDeleteAssociatedSamples); + INSTRUMENTINDEX ReArrangeInstruments(const std::vector<INSTRUMENTINDEX> &newOrder, deleteInstrumentSamples removeSamples = doNoDeleteAssociatedSamples); bool ConvertInstrumentsToSamples(); bool ConvertSamplesToInstruments(); - UINT RemovePlugs(const vector<bool> &keepMask); + UINT RemovePlugs(const std::vector<bool> &keepMask); PATTERNINDEX InsertPattern(ORDERINDEX nOrd = ORDERINDEX_INVALID, ROWINDEX nRows = 64); SAMPLEINDEX InsertSample(bool bLimit = false); Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -72,7 +72,7 @@ { // Increasing number of channels BeginWaitCursor(); - vector<CHANNELINDEX> channels(nNewChannels, CHANNELINDEX_INVALID); + std::vector<CHANNELINDEX> channels(nNewChannels, CHANNELINDEX_INVALID); for(CHANNELINDEX nChn = 0; nChn < GetNumChannels(); nChn++) { channels[nChn] = nChn; @@ -91,8 +91,8 @@ // To remove all channels whose index corresponds to false in the keepMask vector. // Return true on success. -bool CModDoc::RemoveChannels(const vector<bool> &keepMask) -//-------------------------------------------------------- +bool CModDoc::RemoveChannels(const std::vector<bool> &keepMask) +//------------------------------------------------------------- { CHANNELINDEX nRemainingChannels = 0; //First calculating how many channels are to be left @@ -113,7 +113,7 @@ BeginWaitCursor(); // Create new channel order, with only channels from m_bChnMask left. - vector<CHANNELINDEX> channels(nRemainingChannels, 0); + std::vector<CHANNELINDEX> channels(nRemainingChannels, 0); CHANNELINDEX i = 0; for(CHANNELINDEX nChn = 0; nChn < GetNumChannels(); nChn++) { @@ -136,8 +136,8 @@ // Base code for adding, removing, moving and duplicating channels. Returns new number of channels on success, CHANNELINDEX_INVALID otherwise. // The new channel vector can contain CHANNELINDEX_INVALID for adding new (empty) channels. -CHANNELINDEX CModDoc::ReArrangeChannels(const vector<CHANNELINDEX> &newOrder, const bool createUndoPoint) -//------------------------------------------------------------------------------------------------------- +CHANNELINDEX CModDoc::ReArrangeChannels(const std::vector<CHANNELINDEX> &newOrder, const bool createUndoPoint) +//------------------------------------------------------------------------------------------------------------ { //newOrder[i] tells which current channel should be placed to i:th position in //the new order, or if i is not an index of current channels, then new channel is @@ -197,8 +197,8 @@ ModChannel chns[MAX_BASECHANNELS]; ModChannelSettings settings[MAX_BASECHANNELS]; - vector<BYTE> recordStates(GetNumChannels(), 0); - vector<bool> chnMutePendings(GetNumChannels(), false); + std::vector<BYTE> recordStates(GetNumChannels(), 0); + std::vector<bool> chnMutePendings(GetNumChannels(), false); for(CHANNELINDEX nChn = 0; nChn < GetNumChannels(); nChn++) { @@ -244,7 +244,7 @@ struct RewriteInstrumentReferencesInPatterns //========================================== { - RewriteInstrumentReferencesInPatterns(const vector<ModCommand::INSTR> &indices) : instrumentIndices(indices) + RewriteInstrumentReferencesInPatterns(const std::vector<ModCommand::INSTR> &indices) : instrumentIndices(indices) { } @@ -256,15 +256,15 @@ } } - const vector<ModCommand::INSTR> &instrumentIndices; + const std::vector<ModCommand::INSTR> &instrumentIndices; }; // Base code for adding, removing, moving and duplicating samples. Returns new number of samples on success, SAMPLEINDEX_INVALID otherwise. // The new sample vector can contain SAMPLEINDEX_INVALID for adding new (empty) samples. // newOrder indices are zero-based, i.e. newOrder[0] will define the contents of the first sample slot. -SAMPLEINDEX CModDoc::ReArrangeSamples(const vector<SAMPLEINDEX> &newOrder) -//------------------------------------------------------------------------ +SAMPLEINDEX CModDoc::ReArrangeSamples(const std::vector<SAMPLEINDEX> &newOrder) +//----------------------------------------------------------------------------- { if(newOrder.size() > m_SndFile.GetModSpecifications().samplesMax) { @@ -283,10 +283,10 @@ } } - vector<int> sampleCount(oldNumSamples + 1, 0); - vector<ModSample> sampleHeaders(oldNumSamples + 1); - vector<SAMPLEINDEX> newIndex(oldNumSamples + 1, 0); // One of the new indexes for the old sample - vector<std::string> sampleNames(oldNumSamples + 1); + std::vector<int> sampleCount(oldNumSamples + 1, 0); + std::vector<ModSample> sampleHeaders(oldNumSamples + 1); + std::vector<SAMPLEINDEX> newIndex(oldNumSamples + 1, 0); // One of the new indexes for the old sample + std::vector<std::string> sampleNames(oldNumSamples + 1); for(size_t i = 0; i < newOrder.size(); i++) { @@ -368,7 +368,7 @@ { PrepareUndoForAllPatterns(); - vector<ModCommand::INSTR> indices(newIndex.size(), 0); + std::vector<ModCommand::INSTR> indices(newIndex.size(), 0); for(size_t i = 0; i < newIndex.size(); i++) { indices[i] = newIndex[i]; @@ -383,8 +383,8 @@ // Base code for adding, removing, moving and duplicating instruments. Returns new number of instruments on success, INSTRUMENTINDEX_INVALID otherwise. // The new instrument vector can contain INSTRUMENTINDEX_INVALID for adding new (empty) instruments. // newOrder indices are zero-based, i.e. newOrder[0] will define the contents of the first instrument slot. -INSTRUMENTINDEX CModDoc::ReArrangeInstruments(const vector<INSTRUMENTINDEX> &newOrder, deleteInstrumentSamples removeSamples) -//--------------------------------------------------------------------------------------------------------------------------- +INSTRUMENTINDEX CModDoc::ReArrangeInstruments(const std::vector<INSTRUMENTINDEX> &newOrder, deleteInstrumentSamples removeSamples) +//-------------------------------------------------------------------------------------------------------------------------------- { if(newOrder.size() > m_SndFile.GetModSpecifications().instrumentsMax || GetNumInstruments() == 0) { @@ -395,8 +395,8 @@ const INSTRUMENTINDEX oldNumInstruments = m_SndFile.GetNumInstruments(), newNumInstruments = static_cast<INSTRUMENTINDEX>(newOrder.size()); - vector<ModInstrument> instrumentHeaders(oldNumInstruments + 1); - vector<INSTRUMENTINDEX> newIndex(oldNumInstruments + 1, 0); // One of the new indexes for the old instrument + std::vector<ModInstrument> instrumentHeaders(oldNumInstruments + 1); + std::vector<INSTRUMENTINDEX> newIndex(oldNumInstruments + 1, 0); // One of the new indexes for the old instrument for(size_t i = 0; i < newNumInstruments; i++) { const INSTRUMENTINDEX origSlot = newOrder[i]; @@ -444,7 +444,7 @@ PrepareUndoForAllPatterns(); - vector<ModCommand::INSTR> indices(newIndex.size(), 0); + std::vector<ModCommand::INSTR> indices(newIndex.size(), 0); for(size_t i = 0; i < newIndex.size(); i++) { indices[i] = newIndex[i]; @@ -541,8 +541,8 @@ } -UINT CModDoc::RemovePlugs(const vector<bool> &keepMask) -//----------------------------------------------------- +UINT CModDoc::RemovePlugs(const std::vector<bool> &keepMask) +//---------------------------------------------------------- { //Remove all plugins whose keepMask[plugindex] is false. UINT nRemoved = 0; @@ -1076,8 +1076,8 @@ // Check which channels contain note data. maxRemoveCount specified how many empty channels are reported at max. -void CModDoc::CheckUsedChannels(vector<bool> &usedMask, CHANNELINDEX maxRemoveCount) const -//---------------------------------------------------------------------------------------- +void CModDoc::CheckUsedChannels(std::vector<bool> &usedMask, CHANNELINDEX maxRemoveCount) const +//--------------------------------------------------------------------------------------------- { // Checking for unused channels const int nChannels = GetNumChannels(); Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -350,8 +350,8 @@ CHAR s[16]; m_CbnMixingFreq.ResetContent(); - vector<bool> supportedRates; - vector<UINT> samplerates; + std::vector<bool> supportedRates; + std::vector<UINT> samplerates; for(size_t i = 0; i < CountOf(nMixingRates); i++) { samplerates.push_back(nMixingRates[i]); Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -224,8 +224,8 @@ } } - vector<CModDoc *> documents = theApp.GetOpenDocuments(); - for(vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) + std::vector<CModDoc *> documents = theApp.GetOpenDocuments(); + for(std::vector<CModDoc *>::iterator doc = documents.begin(); doc != documents.end(); doc++) { (*doc)->SafeFileClose(); } @@ -240,10 +240,10 @@ // Retrieve a list of all open modules. -vector<CModDoc *> CTrackApp::GetOpenDocuments() const -//--------------------------------------------------- +std::vector<CModDoc *> CTrackApp::GetOpenDocuments() const +//-------------------------------------------------------- { - vector<CModDoc *> documents; + std::vector<CModDoc *> documents; CDocTemplate *pDocTmpl = theApp.GetModDocTemplate(); if(pDocTmpl) @@ -430,7 +430,7 @@ // DLS Banks support #define MPTRACK_REG_DLS "Software\\Olivier Lapicque\\ModPlug Tracker\\DLS Banks" -vector<CDLSBank *> CTrackApp::gpDLSBanks; +std::vector<CDLSBank *> CTrackApp::gpDLSBanks; BOOL CTrackApp::LoadDefaultDLSBanks() @@ -2257,7 +2257,7 @@ if(filterIndex != nullptr) dlg.m_ofn.nFilterIndex = (DWORD)(*filterIndex); - vector<TCHAR> filenameBuffer; + std::vector<TCHAR> filenameBuffer; if(multiSelect) { const size_t bufferSize = 2048; // Note: This is possibly the maximum buffer size in MFC 7(this note was written November 2006). Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -31,9 +31,7 @@ #define NOTEINDEXTYPE CTuning::NOTEINDEXTYPE #define EM_ALLOWALL CTuning::EM_ALLOWALL -using namespace std; - /* TODOS: -Clear tuning @@ -444,7 +442,7 @@ } -TUNINGTYPE CTuningDialog::GetTuningTypeFromStr(const string& str) const +TUNINGTYPE CTuningDialog::GetTuningTypeFromStr(const std::string& str) const //-------------------------------------------------------------------------------- { return CTuning::GetTuningType(str.c_str()); @@ -459,7 +457,7 @@ const size_t BS = 20; char buffer[BS]; m_CombobTuningType.GetWindowText(buffer, BS); - const string strNewType = buffer; + const std::string strNewType = buffer; TUNINGTYPE newType = GetTuningTypeFromStr(strNewType); if(!m_pActiveTuning->IsOfType(newType)) { @@ -535,7 +533,7 @@ const size_t BS = 5; char buffer[BS]; m_EditNotename.GetWindowText(buffer, BS); - string str = string(buffer); + std::string str = std::string(buffer); if(str.length() > 0) { if(str.size() > 3) @@ -568,7 +566,7 @@ const size_t BS = 12; char buffer[BS]; m_EditRatio.GetWindowText(buffer, BS); - string str = buffer; + std::string str = buffer; if(str.length() > 0) { m_pActiveTuning->SetRatio(currentNote, ConvertStrTo<RATIOTYPE>(buffer)); @@ -628,9 +626,9 @@ std::string filter; if(pT != NULL) - filter = string("Tuning files (*") + CTuning::s_FileExtension + string(")|*") + CTuning::s_FileExtension + string("|"); + filter = std::string("Tuning files (*") + CTuning::s_FileExtension + std::string(")|*") + CTuning::s_FileExtension + std::string("|"); if(pTC != NULL) - filter += string("Tuning collection files (") + CTuningCollection::s_FileExtension + string(")|*") + CTuningCollection::s_FileExtension + string("|"); + filter += std::string("Tuning collection files (") + CTuningCollection::s_FileExtension + std::string(")|*") + CTuningCollection::s_FileExtension + std::string("|"); FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(false, CTuning::s_FileExtension, "", filter, @@ -641,8 +639,8 @@ bool failure = true; - ofstream fout(files.first_file.c_str(), ios::binary); - const string ext = "." + files.extension; + std::ofstream fout(files.first_file.c_str(), std::ios::binary); + const std::string ext = "." + files.extension; if(ext == CTuning::s_FileExtension) { @@ -701,7 +699,7 @@ if (bIsTun) { - std::ifstream fin(files.filenames[counter].c_str(), ios::binary); + std::ifstream fin(files.filenames[counter].c_str(), std::ios::binary); pT = CTuningRTI::DeserializeOLD(fin); if(pT == 0) {fin.clear(); fin.seekg(0); pT = CTuningRTI::Deserialize(fin);} @@ -1075,7 +1073,7 @@ bool CTuningDialog::IsDeletable(const CTuningCollection* const pTC) const //-------------------------------------------------------------------------------- { - vector<CTuningCollection*>::const_iterator iter = find(m_DeletableTuningCollections.begin(), m_DeletableTuningCollections.end(), pTC); + std::vector<CTuningCollection*>::const_iterator iter = find(m_DeletableTuningCollections.begin(), m_DeletableTuningCollections.end(), pTC); if(iter != m_DeletableTuningCollections.end()) return true; else @@ -1218,7 +1216,7 @@ CTuningCollection* pTC = GetpTuningCollection(pT); if(pTC) { - string str = string("Remove tuning '") + pT->GetName() + string("' from ' ") + pTC->GetName() + string("'?"); + std::string str = std::string("Remove tuning '") + pT->GetName() + std::string("' from ' ") + pTC->GetName() + std::string("'?"); if(Reporting::Confirm(str.c_str()) == cnfYes) { if(!pTC->Remove(pT)) Modified: trunk/OpenMPT/mptrack/TuningDialog.h =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/TuningDialog.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -18,9 +18,6 @@ #include "afxwin.h" #include "resource.h" -using std::vector; -using std::string; - //========================== template<class T1, class T2> class CBijectiveMap @@ -52,7 +49,7 @@ void RemoveValue_1(const T1& a) { - typename vector<T1>::iterator iter = find(m_T1.begin(), m_T1.end(), a); + typename std::vector<T1>::iterator iter = find(m_T1.begin(), m_T1.end(), a); if(iter != m_T1.end()) { m_T2.erase(m_T2.begin() + (iter-m_T1.begin())); @@ -62,7 +59,7 @@ void RemoveValue_2(const T2& b) { - typename vector<T2>::iterator iter = find(m_T2.begin(), m_T2.end(), b); + typename std::vector<T2>::iterator iter = find(m_T2.begin(), m_T2.end(), b); if(iter != m_T2.end()) { m_T1.erase(m_T1.begin() + (iter-m_T2.begin())); @@ -72,7 +69,7 @@ T2 GetMapping_12(const T1& a) const { - typename vector<T1>::const_iterator iter = find(m_T1.begin(), m_T1.end(), a); + typename std::vector<T1>::const_iterator iter = find(m_T1.begin(), m_T1.end(), a); if(iter != m_T1.end()) { return m_T2[iter-m_T1.begin()]; @@ -83,7 +80,7 @@ T1 GetMapping_21(const T2& b) const { - typename vector<T2>::const_iterator iter = find(m_T2.begin(), m_T2.end(), b); + typename std::vector<T2>::const_iterator iter = find(m_T2.begin(), m_T2.end(), b); if(iter != m_T2.end()) { return m_T1[iter-m_T2.begin()]; @@ -95,8 +92,8 @@ private: //Elements are collected to two arrays so that elements with the //same index are mapped to each other. - vector<T1> m_T1; - vector<T2> m_T2; + std::vector<T1> m_T1; + std::vector<T2> m_T2; T1 m_NotFoundT1; T2 m_NotFoundT2; @@ -211,7 +208,7 @@ }; public: - typedef vector<CTuningCollection*> TUNINGVECTOR; + typedef std::vector<CTuningCollection*> TUNINGVECTOR; public: CTuningDialog(CWnd* pParent = NULL, const TUNINGVECTOR& = TUNINGVECTOR(), CTuning* pTun = NULL); // standard constructor @@ -231,7 +228,7 @@ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support private: - CTuning::TUNINGTYPE GetTuningTypeFromStr(const string& str) const; + CTuning::TUNINGTYPE GetTuningTypeFromStr(const std::string& str) const; void UpdateTuningDescription(); @@ -265,7 +262,7 @@ private: CTuningRatioMapWnd m_RatioMapWnd; TUNINGVECTOR m_TuningCollections; - vector<CTuningCollection*> m_DeletableTuningCollections; + std::vector<CTuningCollection*> m_DeletableTuningCollections; CTuning* m_pActiveTuning; CTuningCollection* m_pActiveTuningCollection; Modified: trunk/OpenMPT/mptrack/Undo.cpp =================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Undo.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -140,7 +140,7 @@ if(undo.channelInfo->oldNumChannels != sndFile.GetNumChannels()) { // Add or remove channels - vector<CHANNELINDEX> channels(undo.channelInfo->oldNumChannels, CHANNELINDEX_INVALID); + std::vector<CHANNELINDEX> channels(undo.channelInfo->oldNumChannels, CHANNELINDEX_INVALID); const CHANNELINDEX copyCount = std::min(sndFile.GetNumChannels(), undo.channelInfo->oldNumChannels); for(CHANNELINDEX i = 0; i < copyCount; i++) { Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -1262,7 +1262,7 @@ } } - vector<PLUGINDEX> emptySlots; + std::vector<PLUGINDEX> emptySlots; BuildEmptySlotList(emptySlots); dlg.SetupMove(m_nCurrentPlugin, emptySlots, defaultIndex); @@ -1371,8 +1371,8 @@ } -void CViewGlobals::BuildEmptySlotList(vector<PLUGINDEX> &emptySlots) -//------------------------------------------------------------------ +void CViewGlobals::BuildEmptySlotList(std::vector<PLUGINDEX> &emptySlots) +//----------------------------------------------------------------------- { CModDoc *pModDoc = GetDocument(); CSoundFile* pSndFile = pModDoc->GetSoundFile(); Modified: trunk/OpenMPT/mptrack/View_gen.h =================================================================== --- trunk/OpenMPT/mptrack/View_gen.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_gen.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -68,7 +68,7 @@ void UnlockControls() { PostMessage(WM_MOD_UNLOCKCONTROLS); } BOOL IsLocked() const { return (m_nLockCount > 0); } int GetDlgItemIntEx(UINT nID); - void BuildEmptySlotList(vector<PLUGINDEX> &emptySlots); + void BuildEmptySlotList(std::vector<PLUGINDEX> &emptySlots); bool MovePlug(PLUGINDEX src, PLUGINDEX dest, bool bAdjustPat = AdjustPattern); public: Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -1299,7 +1299,7 @@ const bool duplicate = (nFlags & MK_SHIFT) != 0; const CHANNELINDEX newChannels = pModDoc->GetNumChannels() + (duplicate ? 1 : 0); - vector<CHANNELINDEX> channels(newChannels, 0); + std::vector<CHANNELINDEX> channels(newChannels, 0); CHANNELINDEX i = 0; bool modified = duplicate; @@ -2613,12 +2613,12 @@ } bool changed = false; - vector<CHANNELINDEX> validChans; + std::vector<CHANNELINDEX> validChans; if(type == PatternCursor::effectColumn || type == PatternCursor::paramColumn) { - vector<CHANNELINDEX> effectChans; - vector<CHANNELINDEX> paramChans; + std::vector<CHANNELINDEX> effectChans; + std::vector<CHANNELINDEX> paramChans; ListChansWhereColSelected(PatternCursor::effectColumn, effectChans); ListChansWhereColSelected(PatternCursor::paramColumn, paramChans); @@ -2677,7 +2677,7 @@ const ROWINDEX row0 = m_Selection.GetStartRow(), row1 = m_Selection.GetEndRow(); //for all channels where type is selected - for(vector<CHANNELINDEX>::iterator iter = validChans.begin(); iter != validChans.end(); iter++) + for(std::vector<CHANNELINDEX>::iterator iter = validChans.begin(); iter != validChans.end(); iter++) { CHANNELINDEX nchn = *iter; @@ -3151,7 +3151,7 @@ str.Format("Remove channel %d? This channel still contains note data!", nChn + 1); if(isEmpty || Reporting::Confirm(str , "Remove channel") == cnfYes) { - vector<bool> keepMask(pModDoc->GetNumChannels(), true); + std::vector<bool> keepMask(pModDoc->GetNumChannels(), true); keepMask[nChn] = false; pModDoc->RemoveChannels(keepMask); SetCurrentPattern(m_nPattern); //Updating the screen. @@ -3167,7 +3167,7 @@ BeginWaitCursor(); // Create new channel order, with channel nBefore being an invalid (and thus empty) channel. - vector<CHANNELINDEX> channels(pModDoc->GetNumChannels() + 1, CHANNELINDEX_INVALID); + std::vector<CHANNELINDEX> channels(pModDoc->GetNumChannels() + 1, CHANNELINDEX_INVALID); CHANNELINDEX i = 0; for(CHANNELINDEX nChn = 0; nChn < pModDoc->GetNumChannels() + 1; nChn++) { @@ -3203,7 +3203,7 @@ BeginWaitCursor(); // Create new channel order, with channel nDupChn duplicated. - vector<CHANNELINDEX> channels(pModDoc->GetNumChannels() + 1, 0); + std::vector<CHANNELINDEX> channels(pModDoc->GetNumChannels() + 1, 0); CHANNELINDEX i = 0; for(CHANNELINDEX nChn = 0; nChn < pModDoc->GetNumChannels() + 1; nChn++) { @@ -3355,7 +3355,7 @@ } // Volume memory for each channel. - vector<uint8> chvol(lastChannel + 1, 64); + std::vector<uint8> chvol(lastChannel + 1, 64); for(ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++) { @@ -6093,7 +6093,7 @@ { HMENU transMenu = CreatePopupMenu(); - vector<CHANNELINDEX> validChans; + std::vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::noteColumn) ? FALSE : MF_GRAYED; if(!greyed || !(TrackerSettings::Instance().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) @@ -6112,7 +6112,7 @@ bool CViewPattern::BuildAmplifyCtxMenu(HMENU hMenu, CInputHandler *ih) const //-------------------------------------------------------------------------- { - vector<CHANNELINDEX> validChans; + std::vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::volumeColumn) ? 0 : MF_GRAYED; if(!greyed || !(TrackerSettings::Instance().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) @@ -6157,7 +6157,7 @@ } - vector<CHANNELINDEX> validChans; + std::vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::instrColumn) ? 0 : MF_GRAYED; if (!greyed || !(TrackerSettings::Instance().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) @@ -6275,8 +6275,8 @@ // Returns an ordered list of all channels in which a given column type is selected. -CHANNELINDEX CViewPattern::ListChansWhereColSelected(PatternCursor::Columns colType, vector<CHANNELINDEX> &chans) const -//--------------------------------------------------------------------------------------------------------------------- +CHANNELINDEX CViewPattern::ListChansWhereColSelected(PatternCursor::Columns colType, std::vector<CHANNELINDEX> &chans) const +//-------------------------------------------------------------------------------------------------------------------------- { CHANNELINDEX startChan = m_Selection.GetStartChannel(); CHANNELINDEX endChan = m_Selection.GetEndChannel(); @@ -6310,12 +6310,12 @@ bool CViewPattern::IsInterpolationPossible(PatternCursor::Columns colType) const //------------------------------------------------------------------------------ { - vector<CHANNELINDEX> validChans; + std::vector<CHANNELINDEX> validChans; ListChansWhereColSelected(colType, validChans); ROWINDEX startRow = m_Selection.GetStartRow(); ROWINDEX endRow = m_Selection.GetEndRow(); - for(vector<CHANNELINDEX>::iterator iter = validChans.begin(); iter != validChans.end(); iter++) + for(std::vector<CHANNELINDEX>::iterator iter = validChans.begin(); iter != validChans.end(); iter++) { if(IsInterpolationPossible(startRow, endRow, *iter, colType)) { Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_pat.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -191,7 +191,7 @@ QuickChannelProperties quickChannelProperties; - vector<ModCommand::NOTE> octaveKeyMemory; + std::vector<ModCommand::NOTE> octaveKeyMemory; // Chord preview CHANNELINDEX chordPatternChannels[MPTChord::notesPerChord]; @@ -466,7 +466,7 @@ bool BuildPCNoteCtxMenu(HMENU hMenu, CInputHandler *ih) const; // Returns an ordered list of all channels in which a given column type is selected. - CHANNELINDEX ListChansWhereColSelected(PatternCursor::Columns colType, vector<CHANNELINDEX> &chans) const; + CHANNELINDEX ListChansWhereColSelected(PatternCursor::Columns colType, std::vector<CHANNELINDEX> &chans) const; // Check if a column type is selected on any channel in the current selection. bool IsColumnSelected(PatternCursor::Columns colType) const; Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -135,7 +135,7 @@ CModTree::~CModTree() //------------------- { - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for(iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { delete (*iter); @@ -309,7 +309,7 @@ //------------------------------------------ { // Check if document is already in the list - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { if ((*iter)->pModDoc == pModDoc) @@ -340,7 +340,7 @@ void CModTree::RemoveDocument(CModDoc *pModDoc) //--------------------------------------------- { - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { if((*iter)->pModDoc == pModDoc) @@ -366,7 +366,7 @@ } if (hItem != NULL) { - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { if (hItem == (*iter)->hSong) return (*iter)->pModDoc; @@ -380,7 +380,7 @@ ModTreeDocInfo *CModTree::GetDocumentInfoFromModDoc(CModDoc *pModDoc) //------------------------------------------------------------------- { - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { if ((*iter)->pModDoc == pModDoc) @@ -2154,7 +2154,7 @@ { const SAMPLEINDEX from = static_cast<SAMPLEINDEX>(modItemDragID - 1), to = static_cast<SAMPLEINDEX>(modItemDropID - 1); - vector<SAMPLEINDEX> newOrder(pModDoc->GetNumSamples()); + std::vector<SAMPLEINDEX> newOrder(pModDoc->GetNumSamples()); for(SAMPLEINDEX smp = 0; smp < pModDoc->GetNumSamples(); smp++) { newOrder[smp] = smp + 1; @@ -2181,7 +2181,7 @@ { const INSTRUMENTINDEX from = static_cast<INSTRUMENTINDEX>(modItemDragID - 1), to = static_cast<INSTRUMENTINDEX>(modItemDropID - 1); - vector<INSTRUMENTINDEX> newOrder(pModDoc->GetNumInstruments()); + std::vector<INSTRUMENTINDEX> newOrder(pModDoc->GetNumInstruments()); for(INSTRUMENTINDEX ins = 0; ins < pModDoc->GetNumInstruments(); ins++) { newOrder[ins] = ins + 1; @@ -2300,7 +2300,7 @@ dwHint &= (HINT_PATNAMES|HINT_SMPNAMES|HINT_INSNAMES|HINT_MODTYPE|HINT_MODGENERAL|HINT_MODSEQUENCE|HINT_MIXPLUGINS|HINT_MPTOPTIONS|HINT_MASK_ITEM|HINT_SEQNAMES); if ((pHint != this) && (dwHint & HINT_MASK_FLAGS)) { - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { if (((*iter)->pModDoc == pModDoc) || (!pModDoc)) @@ -2879,7 +2879,7 @@ //---------------------------- { BeginWaitCursor(); - vector<ModTreeDocInfo *>::iterator iter; + std::vector<ModTreeDocInfo *>::iterator iter; for (iter = DocInfo.begin(); iter != DocInfo.end(); iter++) { UpdateView((*iter), HINT_MODTYPE); @@ -3025,10 +3025,10 @@ // Helper function for generating an insert vector for samples/instruments template<typename T> -vector<T> GenerateInsertVector(size_t howMany, size_t insertPos, T insertId) -//-------------------------------------------------------------------------- +std::vector<T> GenerateInsertVector(size_t howMany, size_t insertPos, T insertId) +//------------------------------------------------------------------------------- { - vector<T> newOrder(howMany); + std::vector<T> newOrder(howMany); for(T i = 0; i < howMany; i++) { newOrder[i] = i + 1; @@ -3063,7 +3063,7 @@ } else if(modItemType == MODITEM_SAMPLE) { // Duplicate sample - vector<SAMPLEINDEX> newOrder = GenerateInsertVector<SAMPLEINDEX>(pSndFile->GetNumSamples(), modItemID, static_cast<SAMPLEINDEX>(modItemID)); + std::vector<SAMPLEINDEX> newOrder = GenerateInsertVector<SAMPLEINDEX>(pSndFile->GetNumSamples(), modItemID, static_cast<SAMPLEINDEX>(modItemID)); if(pModDoc->ReArrangeSamples(newOrder) != SAMPLEINDEX_INVALID) { pModDoc->SetModified(); @@ -3075,7 +3075,7 @@ } else if(modItemType == MODITEM_INSTRUMENT) { // Duplicate instrument - vector<INSTRUMENTINDEX> newOrder = GenerateInsertVector<INSTRUMENTINDEX>(pSndFile->GetNumInstruments(), modItemID, static_cast<INSTRUMENTINDEX>(modItemID)); + std::vector<INSTRUMENTINDEX> newOrder = GenerateInsertVector<INSTRUMENTINDEX>(pSndFile->GetNumInstruments(), modItemID, static_cast<INSTRUMENTINDEX>(modItemID)); if(pModDoc->ReArrangeInstruments(newOrder) != INSTRUMENTINDEX_INVALID) { pModDoc->UpdateAllViews(NULL, HINT_INSNAMES | HINT_INSTRUMENT | HINT_ENVELOPE | HINT_PATTERNDATA); @@ -3113,7 +3113,7 @@ } else if(modItemType == MODITEM_SAMPLE) { // Insert sample - vector<SAMPLEINDEX> newOrder = GenerateInsertVector<SAMPLEINDEX>(pSndFile->GetNumSamples(), modItemID, 0); + std::vector<SAMPLEINDEX> newOrder = GenerateInsertVector<SAMPLEINDEX>(pSndFile->GetNumSamples(), modItemID, 0); if(pModDoc->ReArrangeSamples(newOrder) != SAMPLEINDEX_INVALID) { pModDoc->SetModified(); @@ -3125,7 +3125,7 @@ } else if(modItemType == MODITEM_INSTRUMENT) { // Insert instrument - vector<INSTRUMENTINDEX> newOrder = GenerateInsertVector<INSTRUMENTINDEX>(pSndFile->GetNumInstruments(), modItemID, 0); + std::vector<INSTRUMENTINDEX> newOrder = GenerateInsertVector<INSTRUMENTINDEX>(pSndFile->GetNumInstruments(), modItemID, 0); if(pModDoc->ReArrangeInstruments(newOrder) != INSTRUMENTINDEX_INVALID) { pModDoc->UpdateAllViews(NULL, HINT_INSNAMES| HINT_INSTRUMENT | HINT_ENVELOPE | HINT_PATTERNDATA); Modified: trunk/OpenMPT/mptrack/View_tre.h =================================================================== --- trunk/OpenMPT/mptrack/View_tre.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/View_tre.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -17,9 +17,6 @@ #include <vector> #include <bitset> -using std::vector; -using std::bitset; - #define TREESTATUS_RDRAG 0x01 #define TREESTATUS_LDRAG 0x02 #define TREESTATUS_SINGLEEXPAND 0x04 @@ -29,8 +26,8 @@ { CModDoc *pModDoc; // Tree state variables - vector<vector<HTREEITEM> > tiOrders; - vector<HTREEITEM> tiSequences, tiPatterns; + std::vector<std::vector<HTREEITEM> > tiOrders; + std::vector<HTREEITEM> tiSequences, tiPatterns; HTREEITEM hSong, hPatterns, hSamples, hInstruments, hComments, hOrders, hEffects; HTREEITEM tiSamples[MAX_SAMPLES]; HTREEITEM tiInstruments[MAX_INSTRUMENTS]; @@ -40,8 +37,8 @@ ORDERINDEX nOrdSel; SEQUENCEINDEX nSeqSel; - bitset<MAX_SAMPLES> samplesPlaying; - bitset<MAX_INSTRUMENTS> instrumentsPlaying; + std::bitset<MAX_SAMPLES> samplesPlaying; + std::bitset<MAX_INSTRUMENTS> instrumentsPlaying; ModTreeDocInfo(const CSoundFile &sndFile) { @@ -125,8 +122,8 @@ HTREEITEM m_tiMidiGrp[17]; HTREEITEM m_tiMidi[128]; HTREEITEM m_tiPerc[128]; - vector<HTREEITEM> m_tiDLS; - vector<ModTreeDocInfo *> DocInfo; + std::vector<HTREEITEM> m_tiDLS; + std::vector<ModTreeDocInfo *> DocInfo; // Instrument library bool m_bShowAllFiles, doLabelEdit; CHAR m_szInstrLibPath[_MAX_PATH], m_szOldPath[_MAX_PATH], m_szSongName[_MAX_PATH]; Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -877,7 +877,7 @@ case audioMasterGetPreviousPlug: if(pVstPlugin != nullptr) { - vector<CVstPlugin *> list; + std::vector<CVstPlugin *> list; if(pVstPlugin->GetInputPlugList(list) != 0) { // We don't assign plugins to pins... @@ -890,7 +890,7 @@ case audioMasterGetNextPlug: if(pVstPlugin != nullptr) { - vector<CVstPlugin *> list; + std::vector<CVstPlugin *> list; if(pVstPlugin->GetOutputPlugList(list) != 0) { // We don't assign plugins to pins... @@ -2854,8 +2854,8 @@ // Get list of plugins to which output is sent. A nullptr indicates master output. -size_t CVstPlugin::GetOutputPlugList(vector<CVstPlugin *> &list) -//-------------------------------------------------------------- +size_t CVstPlugin::GetOutputPlugList(std::vector<CVstPlugin *> &list) +//------------------------------------------------------------------- { // At the moment we know there will only be 1 output. // Returning nullptr means plugin outputs directly to master. Modified: trunk/OpenMPT/mptrack/dlg_misc.h =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/dlg_misc.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -75,7 +75,7 @@ { public: CSoundFile &sndFile; - vector<bool> m_bKeepMask; + std::vector<bool> m_bKeepMask; CHANNELINDEX m_nChannels, m_nRemove; CListBox m_RemChansList; //rewbs.removeChansDlgCleanup bool m_ShowCancel; Modified: trunk/OpenMPT/mptrack/mod2midi.cpp =================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/mod2midi.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -363,7 +363,7 @@ RMIDDATACHUNK rmid; MTHDCHUNK mthd; MTRKCHUNK mtrk; - vector<DYNMIDITRACK> Tracks(m_pSndFile->GetNumChannels()); + std::vector<DYNMIDITRACK> Tracks(m_pSndFile->GetNumChannels()); UINT nMidiChCurPrg[16]; BYTE tmp[256]; CHAR s[256]; Modified: trunk/OpenMPT/mptrack/tagging.cpp =================================================================== --- trunk/OpenMPT/mptrack/tagging.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/tagging.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -91,8 +91,8 @@ } // Write a ID3v2 frame -void CFileTagging::WriteID3v2Frame(char cFrameID[4], string sFramecontent, FILE *f) -//--------------------------------------------------------------------------------- +void CFileTagging::WriteID3v2Frame(char cFrameID[4], std::string sFramecontent, FILE *f) +//-------------------------------------------------------------------------------------- { if(!cFrameID[0] || sFramecontent.empty() || !f) return; @@ -138,7 +138,7 @@ struct { uint32 id; - string *data; + std::string *data; } chunks[] = { { IFFID_ICMT, &comments }, @@ -170,7 +170,7 @@ continue; } - string data = *chunks[iCmt].data; + std::string data = *chunks[iCmt].data; // Special case: Expand year to full date if(chunks[iCmt].id == IFFID_ICRD) { Modified: trunk/OpenMPT/mptrack/tagging.h =================================================================== --- trunk/OpenMPT/mptrack/tagging.h 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/tagging.h 2013-06-27 15:00:03 UTC (rev 2416) @@ -13,8 +13,6 @@ #include <string> #include "Wav.h" -using std::string; - /////////////////////////////////////////////////////////////////////////////////////////////////// // ID3v2.4 Tags @@ -73,7 +71,7 @@ void WriteWaveTags(WAVEDATAHEADER *wdh, WAVEFILEHEADER *wfh, FILE *f); // Tag data - string title, artist, album, year, comments, genre, url, encoder, bpm; + std::string title, artist, album, year, comments, genre, url, encoder, bpm; CFileTagging(); @@ -82,7 +80,7 @@ // Convert Integer to Synchsafe Integer (see ID3v2.4 specs) uint32 intToSynchsafe(uint32 in); // Write a frame - void WriteID3v2Frame(char cFrameID[4], string sFramecontent, FILE *f); + void WriteID3v2Frame(char cFrameID[4], std::string sFramecontent, FILE *f); // Size of our tag uint32 totalID3v2Size; }; Modified: trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp =================================================================== --- trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -73,7 +73,7 @@ s[0] = 0; const bool isValidNote = m_pTuning->IsValidNote(noteToDraw); - string temp; + std::string temp; if(isValidNote) { temp = "(" + Stringify(noteToDraw) + ") " + m_pTuning->GetNoteName(noteToDraw); @@ -100,7 +100,7 @@ rect.InflateRect(1, 1); } dc.SetTextColor((bHighLight) ? colorTextSel : colorText); - string str = Stringify(m_pTuning->GetRatio(noteToDraw)); + std::string str = Stringify(m_pTuning->GetRatio(noteToDraw)); dc.DrawText(str.c_str(), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); } rect.SetRect(rcClient.left+m_cxFont*2-1, rcClient.top, rcClient.left+m_cxFont*2+3, ypaint); Modified: trunk/OpenMPT/soundlib/Load_itp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_itp.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/soundlib/Load_itp.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -451,7 +451,7 @@ id = m_nSamples; fwrite(&id, 1, sizeof(id), f); - vector<bool> sampleUsed(GetNumSamples() + 1, false); + std::vector<bool> sampleUsed(GetNumSamples() + 1, false); // Mark samples used in instruments for(i = 0; i < m_nInstruments; i++) Modified: trunk/OpenMPT/soundlib/Load_mid.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mid.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/soundlib/Load_mid.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -473,7 +473,7 @@ const MIDITRACKHEADER *pmth; MODCHANNELSTATE chnstate[MAX_BASECHANNELS]; MIDICHANNELSTATE midichstate[16]; - vector<MIDITRACK> miditracks; + std::vector<MIDITRACK> miditracks; DWORD dwMemPos, dwGlobalFlags, tracks, tempo; UINT row, pat, midimastervol; short int division; Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp =================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp 2013-06-27 14:21:41 UTC (rev 2415) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp 2013-06-27 15:00:03 UTC (rev 2416) @@ -27,8 +27,6 @@ -Handle const-status better(e.g. status check in unserialization) */ -using namespace std; - const TCHAR CTuningCollection::s_FileExtension[4] = MPT_TEXT(".tc"); namespace CTuningS11n @@ -40,7 +38,7 @@ void ReadRatioTable(std::istream& iStrm, std::vector<CTuningRTI::RATIOTYPE>& v, const size_t); void WriteStr(std::ostream& oStrm, const std::string& str); - void ReadTuning(istream& iStrm, CTuningCollection& Tc, const size_t) {Tc.AddTuning(iStrm, true);} + void ReadTuning(std::istream& iStrm, CTuningCollection& Tc, const size_t) {Tc.AddTuning(iStrm, true);} void WriteTuning(std::ostream& oStrm, const CTuning& t) {t.Serialize(oStrm);} } // namespace CTuningS11n @@ -101,7 +99,7 @@ } -CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::Serialize(ostream& oStrm) const +CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::Serialize(std::ostream& oStrm) const //-------------------------------------------------------------- { srlztn::Ssb ssb(oStrm); @@ -126,7 +124,7 @@ { if(m_SavefilePath.length() < 1) return SERIALIZATION_FAILURE; - ofstream fout(m_SavefilePath.c_str(), ios::binary); + std::ofstream fout(m_SavefilePath.c_str(), std::ios::binary); if(!fout.good()) return SERIALIZATION_FAILURE; @@ -141,7 +139,7 @@ { if(m_SavefilePath.length() < 1) return SERIALIZATION_FAILURE; - ifstream fin(m_SavefilePath.c_str(), ios::binary); + std::ifstream fin(m_SavefilePath.c_str(), std::ios::binary); if(!fin.good()) return SERIALIZATION_FAILURE; @@ -152,10 +150,10 @@ } -CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::Deserialize(istream& iStrm) +CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::Deserialize(std::istream& iStrm) //--------------------------------------------------------- { - istream::pos_type startpos = iStrm.tellg(); + std::istream::pos_type startpos = iStrm.tellg(); bool oldLoadingSuccess = false; if(DeserializeOLD(iStrm, oldLoadingSuccess)) @@ -193,7 +191,7 @@ //Returns false if stream content was recognised to be right kind of file(by beginmarker), //else true, and sets bool parameter to true if loading was successful -bool CTuningCollection::DeserializeOLD(istream& inStrm, bool& loadingSuccessful) +bool CTuningCollection::DeserializeOLD(std::istream& inStrm, bool& loadingSuccessful) //------------------------------------------------------------------------------ { //s_SerializationBeginMarker = 0x54435348; //ascii of TCSH @@ -309,7 +307,7 @@ } -bool CTuningCollection::AddTuning(istream& inStrm, const bool ignoreEditmask) +bool CTuningCollection::AddTuning(std::istream& inStrm, const bool ignoreEditmask) //--------------------------------------------------------------------------- { if((!ignoreEditmask && (m_EditMask & EM_ADD) == 0) || m_Tunings.size() >= s_nMaxTuningCount) @@ -357,5 +355,5 @@ //------------------------------------------------- { std::bitset<16> mask(m_EditMask); - return mask.to_string<char, char_traits<char>, allocator<char> >(); + return mask.to_string<char, std::char_traits<char>, std::allocator<char> >(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |