summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-17 02:09:02 -0400
committerLioncash <mathew1800@gmail.com>2014-08-17 02:09:02 -0400
commit97ffb08a42fc1cb8d58c875b289ff840bcfea1eb (patch)
treed56bb3ab660e762fc09dff6340027f8fa725c2f4 /Source
parent6ee2267b2d3068bea467a6d5dfe1eacd8050d7de (diff)
parent4759510f70c0b9b66ff4846790f1f78a80301caa (diff)
Merge pull request #767 from lioncash/namespaces
Get rid of instances of "using namespace std;" in the project
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/AudioCommon/aldlist.cpp2
-rw-r--r--Source/Core/AudioCommon/aldlist.h16
-rw-r--r--Source/Core/Common/ExtendedTrace.cpp1
-rw-r--r--Source/Core/Core/FifoPlayer/FifoDataFile.cpp1
-rw-r--r--Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp5
-rw-r--r--Source/Core/Core/FifoPlayer/FifoRecorder.cpp2
-rw-r--r--Source/Core/Core/PowerPC/JitCommon/JitCache.cpp20
-rw-r--r--Source/Core/Core/PowerPC/PPCAnalyst.cpp8
-rw-r--r--Source/Core/DolphinWX/FifoPlayerDlg.cpp4
9 files changed, 25 insertions, 34 deletions
diff --git a/Source/Core/AudioCommon/aldlist.cpp b/Source/Core/AudioCommon/aldlist.cpp
index 6e506d57c2..a849aeba68 100644
--- a/Source/Core/AudioCommon/aldlist.cpp
+++ b/Source/Core/AudioCommon/aldlist.cpp
@@ -86,7 +86,7 @@ ALDeviceList::ALDeviceList()
alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(s32), &ALDeviceInfo.iMajorVersion);
alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(s32), &ALDeviceInfo.iMinorVersion);
- ALDeviceInfo.pvstrExtensions = new vector<string>;
+ ALDeviceInfo.pvstrExtensions = new std::vector<std::string>;
// Check for ALC Extensions
if (alcIsExtensionPresent(device, "ALC_EXT_CAPTURE") == AL_TRUE)
diff --git a/Source/Core/AudioCommon/aldlist.h b/Source/Core/AudioCommon/aldlist.h
index fabe435233..c24ce92651 100644
--- a/Source/Core/AudioCommon/aldlist.h
+++ b/Source/Core/AudioCommon/aldlist.h
@@ -10,22 +10,20 @@
//'255' characters in the browser information"
#endif
-using namespace std;
-
typedef struct
{
- string strDeviceName;
- s32 iMajorVersion;
- s32 iMinorVersion;
- u32 uiSourceCount;
- vector<string>* pvstrExtensions;
- bool bSelected;
+ std::string strDeviceName;
+ s32 iMajorVersion;
+ s32 iMinorVersion;
+ u32 uiSourceCount;
+ std::vector<std::string>* pvstrExtensions;
+ bool bSelected;
} ALDEVICEINFO, *LPALDEVICEINFO;
class ALDeviceList
{
private:
- vector<ALDEVICEINFO> vDeviceInfo;
+ std::vector<ALDEVICEINFO> vDeviceInfo;
s32 defaultDeviceIndex;
s32 filterIndex;
diff --git a/Source/Core/Common/ExtendedTrace.cpp b/Source/Core/Common/ExtendedTrace.cpp
index 8998a70b4b..dfc96e3c59 100644
--- a/Source/Core/Common/ExtendedTrace.cpp
+++ b/Source/Core/Common/ExtendedTrace.cpp
@@ -19,7 +19,6 @@
#include "Common/ExtendedTrace.h"
#include "Common/StringUtil.h"
-using namespace std;
#include <tchar.h>
#include <ImageHlp.h>
diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
index 9ddfe04472..4c39d68639 100644
--- a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
+++ b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
@@ -11,7 +11,6 @@
#include "Core/FifoPlayer/FifoFileStruct.h"
using namespace FifoFileStruct;
-using namespace std;
FifoDataFile::FifoDataFile() :
m_Flags(0)
diff --git a/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp b/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
index 3dbd84777b..2090ad34d9 100644
--- a/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
+++ b/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
@@ -12,7 +12,6 @@
#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/VertexLoader.h"
-using namespace std;
using namespace FifoAnalyzer;
// For debugging
@@ -291,10 +290,10 @@ void FifoPlaybackAnalyzer::StoreEfbCopyRegion()
void FifoPlaybackAnalyzer::StoreWrittenRegion(u32 address, u32 size)
{
u32 end = address + size;
- vector<MemoryRange>::iterator newRangeIter = m_WrittenMemory.end();
+ auto newRangeIter = m_WrittenMemory.end();
// Search for overlapping memory regions and expand them to include the new region
- for (vector<MemoryRange>::iterator iter = m_WrittenMemory.begin(); iter != m_WrittenMemory.end();)
+ for (auto iter = m_WrittenMemory.begin(); iter != m_WrittenMemory.end();)
{
MemoryRange &range = *iter;
diff --git a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp
index 140ad218c5..3e52916dd2 100644
--- a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp
+++ b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp
@@ -13,8 +13,6 @@
static FifoRecorder instance;
static std::recursive_mutex sMutex;
-using namespace std;
-
FifoRecorder::FifoRecorder() :
m_IsRecording(false),
m_WasRecording(false),
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
index a3723253b5..dbf7b69ff6 100644
--- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
+++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
@@ -264,19 +264,19 @@ using namespace Gen;
}
}
- using namespace std;
-
void JitBaseBlockCache::LinkBlock(int i)
{
LinkBlockExits(i);
JitBlock &b = blocks[i];
- pair<multimap<u32, int>::iterator, multimap<u32, int>::iterator> ppp;
// equal_range(b) returns pair<iterator,iterator> representing the range
// of element with key b
- ppp = links_to.equal_range(b.originalAddress);
+ auto ppp = links_to.equal_range(b.originalAddress);
+
if (ppp.first == ppp.second)
return;
- for (multimap<u32, int>::iterator iter = ppp.first; iter != ppp.second; ++iter) {
+
+ for (auto iter = ppp.first; iter != ppp.second; ++iter)
+ {
// PanicAlert("Linking block %i to block %i", iter->second, i);
LinkBlockExits(iter->second);
}
@@ -285,11 +285,13 @@ using namespace Gen;
void JitBaseBlockCache::UnlinkBlock(int i)
{
JitBlock &b = blocks[i];
- pair<multimap<u32, int>::iterator, multimap<u32, int>::iterator> ppp;
- ppp = links_to.equal_range(b.originalAddress);
+ auto ppp = links_to.equal_range(b.originalAddress);
+
if (ppp.first == ppp.second)
return;
- for (multimap<u32, int>::iterator iter = ppp.first; iter != ppp.second; ++iter) {
+
+ for (auto iter = ppp.first; iter != ppp.second; ++iter)
+ {
JitBlock &sourceBlock = blocks[iter->second];
for (auto& e : sourceBlock.linkData)
{
@@ -344,7 +346,7 @@ using namespace Gen;
// !! this works correctly under assumption that any two overlapping blocks end at the same address
if (destroy_block)
{
- std::map<pair<u32,u32>, u32>::iterator it1 = block_map.lower_bound(std::make_pair(pAddr, 0)), it2 = it1;
+ std::map<std::pair<u32,u32>, u32>::iterator it1 = block_map.lower_bound(std::make_pair(pAddr, 0)), it2 = it1;
while (it2 != block_map.end() && it2->first.second < pAddr + length)
{
JitBlock &b = blocks[it2->second];
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
index a8d6b65927..20efecc362 100644
--- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp
+++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
@@ -28,10 +28,8 @@
// It is also useful for finding function boundaries so that we can find, fingerprint and detect library functions.
// We don't do this much currently. Only for the special case Super Monkey Ball.
-namespace PPCAnalyst {
-
-using namespace std;
-
+namespace PPCAnalyst
+{
static const int CODEBUFFER_SIZE = 32000;
// 0 does not perform block merging
static const u32 FUNCTION_FOLLOWING_THRESHOLD = 16;
@@ -306,7 +304,7 @@ static void FindFunctionsFromBranches(u32 startAddr, u32 endAddr, SymbolDB *func
static void FindFunctionsAfterBLR(PPCSymbolDB *func_db)
{
- vector<u32> funcAddrs;
+ std::vector<u32> funcAddrs;
for (const auto& func : func_db->Symbols())
funcAddrs.push_back(func.second.address + func.second.size);
diff --git a/Source/Core/DolphinWX/FifoPlayerDlg.cpp b/Source/Core/DolphinWX/FifoPlayerDlg.cpp
index f8cac00873..b98b3a0b8b 100644
--- a/Source/Core/DolphinWX/FifoPlayerDlg.cpp
+++ b/Source/Core/DolphinWX/FifoPlayerDlg.cpp
@@ -51,8 +51,6 @@ DEFINE_EVENT_TYPE(RECORDING_FINISHED_EVENT)
DECLARE_EVENT_TYPE(FRAME_WRITTEN_EVENT, -1)
DEFINE_EVENT_TYPE(FRAME_WRITTEN_EVENT)
-using namespace std;
-
static std::recursive_mutex sMutex;
wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = nullptr;
@@ -955,7 +953,7 @@ wxString FifoPlayerDlg::CreateRecordingMemSizeLabel() const
size_t memBytes = 0;
for (size_t frameNum = 0; frameNum < file->GetFrameCount(); ++frameNum)
{
- const vector<MemoryUpdate>& memUpdates = file->GetFrame(frameNum).memoryUpdates;
+ const std::vector<MemoryUpdate>& memUpdates = file->GetFrame(frameNum).memoryUpdates;
for (auto& memUpdate : memUpdates)
memBytes += memUpdate.size;
}