Merge pull request #767 from lioncash/namespaces
Get rid of instances of "using namespace std;" in the project
This commit is contained in:
commit
97ffb08a42
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "Common/ExtendedTrace.h"
|
||||
#include "Common/StringUtil.h"
|
||||
using namespace std;
|
||||
|
||||
#include <tchar.h>
|
||||
#include <ImageHlp.h>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "Core/FifoPlayer/FifoFileStruct.h"
|
||||
|
||||
using namespace FifoFileStruct;
|
||||
using namespace std;
|
||||
|
||||
FifoDataFile::FifoDataFile() :
|
||||
m_Flags(0)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
static FifoRecorder instance;
|
||||
static std::recursive_mutex sMutex;
|
||||
|
||||
using namespace std;
|
||||
|
||||
FifoRecorder::FifoRecorder() :
|
||||
m_IsRecording(false),
|
||||
m_WasRecording(false),
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue