gsdx: Prefix std:: to vector

Also use auto when appropriate
This commit is contained in:
Jonathan Li 2017-05-26 16:57:49 +01:00 committed by Gregory Hainaut
parent 2aeb406e38
commit 5415b7ad5b
15 changed files with 47 additions and 47 deletions

View File

@ -1427,10 +1427,10 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
return;
}
struct Packet {uint8 type, param; uint32 size, addr; vector<uint8> buff;};
struct Packet {uint8 type, param; uint32 size, addr; std::vector<uint8> buff;};
list<Packet*> packets;
vector<uint8> buff;
std::vector<uint8> buff;
uint8 regs[0x2000];
GSsetBaseMem(regs);

View File

@ -54,7 +54,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
class GSSourceOutputPin : public CBaseOutputPin
{
GSVector2i m_size;
vector<CMediaType> m_mts;
std::vector<CMediaType> m_mts;
public:
GSSourceOutputPin(const GSVector2i& size, REFERENCE_TIME atpf, CBaseFilter* pFilter, CCritSec* pLock, HRESULT& hr, int colorspace)
@ -128,9 +128,9 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
HRESULT CheckMediaType(const CMediaType* pmt)
{
for(vector<CMediaType>::iterator i = m_mts.begin(); i != m_mts.end(); i++)
for(const auto &mt : m_mts)
{
if(i->majortype == pmt->majortype && i->subtype == pmt->subtype)
if(mt.majortype == pmt->majortype && mt.subtype == pmt->subtype)
{
return S_OK;
}

View File

@ -1355,7 +1355,7 @@ void GSDevice11::CompileShader(const char* source, size_t size, const char* fn,
{
HRESULT hr;
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);
@ -1392,7 +1392,7 @@ void GSDevice11::CompileShader(const char* source, size_t size, const char* fn,
{
HRESULT hr;
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);
@ -1422,7 +1422,7 @@ void GSDevice11::CompileShader(const char* source, size_t size, const char* fn,
{
HRESULT hr;
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);
@ -1452,7 +1452,7 @@ void GSDevice11::CompileShader(const char* source, size_t size, const char* fn,
{
HRESULT hr;
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);
@ -1482,7 +1482,7 @@ void GSDevice11::CompileShader(const char* source, size_t size, const char *fn,
{
HRESULT hr;
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);

View File

@ -1456,7 +1456,7 @@ void GSDevice9::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector4
void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
{
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);
@ -1503,7 +1503,7 @@ void GSDevice9::CompileShader(const char *source, size_t size, const char *filen
flags |= D3DCOMPILE_SKIP_VALIDATION;
}
vector<D3D_SHADER_MACRO> m;
std::vector<D3D_SHADER_MACRO> m;
PrepareShaderMacro(m, macro);

View File

@ -318,7 +318,7 @@ public:
static bool LoadD3DCompiler();
static void FreeD3DCompiler();
template<class T> void PrepareShaderMacro(vector<T>& dst, const T* src)
template<class T> void PrepareShaderMacro(std::vector<T>& dst, const T* src)
{
dst.clear();

View File

@ -164,7 +164,7 @@ void GSDialog::SetTextAsInt(UINT id, int i)
SetText(id, buff);
}
void GSDialog::ComboBoxInit(UINT id, const vector<GSSetting>& settings, int32_t selectionValue, int32_t maxValue)
void GSDialog::ComboBoxInit(UINT id, const std::vector<GSSetting>& settings, int32_t selectionValue, int32_t maxValue)
{
if (settings.empty())
return;

View File

@ -51,7 +51,7 @@ public:
void SetText(UINT id, const char* str);
void SetTextAsInt(UINT id, int i);
void ComboBoxInit(UINT id, const vector<GSSetting>& settings, int32_t selectionValue, int32_t maxValue = INT32_MAX);
void ComboBoxInit(UINT id, const std::vector<GSSetting>& settings, int32_t selectionValue, int32_t maxValue = INT32_MAX);
int ComboBoxAppend(UINT id, const char* str, LPARAM data = 0, bool select = false);
bool ComboBoxGetSelData(UINT id, INT_PTR& data);
void ComboBoxFixDroppedWidth(UINT id);

View File

@ -81,7 +81,7 @@ GtkWidget* left_label(const char* lbl)
void CB_ChangedComboBox(GtkComboBox *combo, gpointer user_data)
{
int p = gtk_combo_box_get_active(combo);
vector<GSSetting>* s = (vector<GSSetting>*)g_object_get_data(G_OBJECT(combo), "Settings");
auto s = reinterpret_cast<std::vector<GSSetting>*>(g_object_get_data(G_OBJECT(combo), "Settings"));
try {
theApp.SetConfig((char*)user_data, s->at(p).value);
@ -89,7 +89,7 @@ void CB_ChangedComboBox(GtkComboBox *combo, gpointer user_data)
}
}
GtkWidget* CreateComboBoxFromVector(const vector<GSSetting>& s, const char* opt_name)
GtkWidget* CreateComboBoxFromVector(const std::vector<GSSetting>& s, const char* opt_name)
{
GtkWidget* combo_box = gtk_combo_box_text_new();
int32_t opt_value = theApp.GetConfigI(opt_name);

View File

@ -636,7 +636,7 @@ GSPixelOffset4* GSLocalMemory::GetPixelOffset4(const GIFRegFRAME& FRAME, const G
static bool cmp_vec2x(const GSVector2i& a, const GSVector2i& b) {return a.x < b.x;}
vector<GSVector2i>* GSLocalMemory::GetPage2TileMap(const GIFRegTEX0& TEX0)
std::vector<GSVector2i>* GSLocalMemory::GetPage2TileMap(const GIFRegTEX0& TEX0)
{
uint64 hash = TEX0.u64 & 0x3ffffffffull; // TBP0 TBW PSM TW TH
@ -670,7 +670,7 @@ vector<GSVector2i>* GSLocalMemory::GetPage2TileMap(const GIFRegTEX0& TEX0)
// combine the lower 5 bits of the address into a 9:5 pointer:mask form, so the "valid bits" can be tested against an uint32 array
vector<GSVector2i>* p2t = new vector<GSVector2i>[MAX_PAGES];
auto p2t = new std::vector<GSVector2i>[MAX_PAGES];
for(const auto &i : tmp)
{

View File

@ -185,7 +185,7 @@ public:
GSOffset* GetOffset(uint32 bp, uint32 bw, uint32 psm);
GSPixelOffset* GetPixelOffset(const GIFRegFRAME& FRAME, const GIFRegZBUF& ZBUF);
GSPixelOffset4* GetPixelOffset4(const GIFRegFRAME& FRAME, const GIFRegZBUF& ZBUF);
vector<GSVector2i>* GetPage2TileMap(const GIFRegTEX0& TEX0);
std::vector<GSVector2i>* GetPage2TileMap(const GIFRegTEX0& TEX0);
// address

View File

@ -1919,7 +1919,7 @@ GSRendererCL::CL::CL()
throw new std::runtime_error("OpenCL device not found");
}
vector<cl::Device> tmp;
std::vector<cl::Device> tmp;
for(auto d : devs) tmp.push_back(d.device);
@ -2032,7 +2032,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
if(binaries.size() == devs.size())
{
vector<cl::Device> tmp;
std::vector<cl::Device> tmp;
for(auto d : devs) tmp.push_back(d.device);
@ -2087,8 +2087,8 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
{
try
{
vector<size_t> sizes = program.getInfo<CL_PROGRAM_BINARY_SIZES>();
vector<char*> binaries = program.getInfo<CL_PROGRAM_BINARIES>();
std::vector<size_t> sizes = program.getInfo<CL_PROGRAM_BINARY_SIZES>();
std::vector<char*> binaries = program.getInfo<CL_PROGRAM_BINARIES>();
for(size_t i = 0; i < binaries.size(); i++)
{

View File

@ -48,7 +48,7 @@ class GSRendererOGL final : public GSRendererHW
bool m_accurate_date;
int m_sw_blending;
PRIM_OVERLAP m_prim_overlap;
vector<size_t> m_drawlist;
std::vector<size_t> m_drawlist;
unsigned int UserHacks_TCOffset;
float UserHacks_TCO_x, UserHacks_TCO_y;

View File

@ -116,7 +116,7 @@ void GSSettingsDlg::OnInit()
}
std::string adapter_setting = theApp.GetConfigS("Adapter");
vector<GSSetting> adapter_settings;
std::vector<GSSetting> adapter_settings;
unsigned int adapter_sel = 0;
for(unsigned int i = 0; i < adapters.size(); i++)
@ -324,7 +324,7 @@ void GSSettingsDlg::UpdateRenderers()
D3D_FEATURE_LEVEL level = adapters[(int)i].level;
vector<GSSetting> renderers;
std::vector<GSSetting> renderers;
GSRendererType renderer_setting;

View File

@ -91,7 +91,7 @@ class GSSettingsDlg : public GSDialog
std::vector<Adapter> adapters;
vector<GSSetting> m_ocl_devs;
std::vector<GSSetting> m_ocl_devs;
uint32 m_lastValidMsaa; // used to revert to previous dialog value if the user changed to invalid one, or lesser one and canceled
void UpdateRenderers();

View File

@ -69,26 +69,26 @@ public:
void SetConfigDir(const char* dir);
vector<GSSetting> m_gs_renderers;
vector<GSSetting> m_gs_interlace;
vector<GSSetting> m_gs_aspectratio;
vector<GSSetting> m_gs_upscale_multiplier;
vector<GSSetting> m_gs_max_anisotropy;
vector<GSSetting> m_gs_bifilter;
vector<GSSetting> m_gs_trifilter;
vector<GSSetting> m_gs_gl_ext;
vector<GSSetting> m_gs_hack;
vector<GSSetting> m_gs_offset_hack;
vector<GSSetting> m_gs_hw_mipmapping;
vector<GSSetting> m_gs_crc_level;
vector<GSSetting> m_gs_acc_blend_level;
vector<GSSetting> m_gs_tv_shaders;
std::vector<GSSetting> m_gs_renderers;
std::vector<GSSetting> m_gs_interlace;
std::vector<GSSetting> m_gs_aspectratio;
std::vector<GSSetting> m_gs_upscale_multiplier;
std::vector<GSSetting> m_gs_max_anisotropy;
std::vector<GSSetting> m_gs_bifilter;
std::vector<GSSetting> m_gs_trifilter;
std::vector<GSSetting> m_gs_gl_ext;
std::vector<GSSetting> m_gs_hack;
std::vector<GSSetting> m_gs_offset_hack;
std::vector<GSSetting> m_gs_hw_mipmapping;
std::vector<GSSetting> m_gs_crc_level;
std::vector<GSSetting> m_gs_acc_blend_level;
std::vector<GSSetting> m_gs_tv_shaders;
vector<GSSetting> m_gpu_renderers;
vector<GSSetting> m_gpu_filter;
vector<GSSetting> m_gpu_dithering;
vector<GSSetting> m_gpu_aspectratio;
vector<GSSetting> m_gpu_scale;
std::vector<GSSetting> m_gpu_renderers;
std::vector<GSSetting> m_gpu_filter;
std::vector<GSSetting> m_gpu_dithering;
std::vector<GSSetting> m_gpu_aspectratio;
std::vector<GSSetting> m_gpu_scale;
};
struct GSDXError {};