gsdx: Prefix std:: to ostringstream, pair, codecvt*

This commit is contained in:
Jonathan Li 2017-05-26 17:44:55 +01:00 committed by Gregory Hainaut
parent 7ed360e06b
commit 82d1aba67f
3 changed files with 14 additions and 14 deletions

View File

@ -178,9 +178,9 @@ void GSOsdManager::Log(const char *utf8, uint32 color) {
for(char32_t* c = buffer; *c; ++c) AddGlyph(*c); for(char32_t* c = buffer; *c; ++c) AddGlyph(*c);
#else #else
#if _MSC_VER == 1900 #if _MSC_VER == 1900
std::wstring_convert<codecvt_utf8<unsigned int>, unsigned int> conv; std::wstring_convert<std::codecvt_utf8<unsigned int>, unsigned int> conv;
#else #else
std::wstring_convert<codecvt_utf8<char32_t>, char32_t> conv; std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
#endif #endif
std::u32string buffer = conv.from_bytes(utf8); std::u32string buffer = conv.from_bytes(utf8);
for(auto const &c : buffer) AddGlyph(c); for(auto const &c : buffer) AddGlyph(c);
@ -203,9 +203,9 @@ void GSOsdManager::Monitor(const char *key, const char *value, uint32 color) {
for(char32_t* c = vbuffer; *c; ++c) AddGlyph(*c); for(char32_t* c = vbuffer; *c; ++c) AddGlyph(*c);
#else #else
#if _MSC_VER == 1900 #if _MSC_VER == 1900
std::wstring_convert<codecvt_utf8<unsigned int>, unsigned int> conv; std::wstring_convert<std::codecvt_utf8<unsigned int>, unsigned int> conv;
#else #else
std::wstring_convert<codecvt_utf8<char32_t>, char32_t> conv; std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
#endif #endif
std::u32string buffer = conv.from_bytes(key); std::u32string buffer = conv.from_bytes(key);
std::u32string vbuffer = conv.from_bytes(value); std::u32string vbuffer = conv.from_bytes(value);
@ -219,9 +219,9 @@ void GSOsdManager::Monitor(const char *key, const char *value, uint32 color) {
dumb_utf8_to_utf32(key, buffer, countof(buffer)); dumb_utf8_to_utf32(key, buffer, countof(buffer));
#else #else
#if _MSC_VER == 1900 #if _MSC_VER == 1900
std::wstring_convert<codecvt_utf8<unsigned int>, unsigned int> conv; std::wstring_convert<std::codecvt_utf8<unsigned int>, unsigned int> conv;
#else #else
std::wstring_convert<codecvt_utf8<char32_t>, char32_t> conv; std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
#endif #endif
std::u32string buffer = conv.from_bytes(key); std::u32string buffer = conv.from_bytes(key);
#endif #endif

View File

@ -1997,7 +1997,7 @@ void GSRendererCL::CL::Unmap()
pb.mapped_ptr = pb.ptr = NULL; pb.mapped_ptr = pb.ptr = NULL;
} }
cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt) cl::Kernel GSRendererCL::CL::Build(const char* entry, std::ostringstream& opt)
{ {
cl::Program program; cl::Program program;
@ -2017,7 +2017,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
{ {
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);
long size = ftell(f); long size = ftell(f);
pair<void*, size_t> b(new char[size], size); std::pair<void*, size_t> b(new char[size], size);
fseek(f, 0, SEEK_SET); fseek(f, 0, SEEK_SET);
fread(b.first, b.second, 1, f); fread(b.first, b.second, 1, f);
fclose(f); fclose(f);
@ -2114,7 +2114,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
return cl::Kernel(program, entry); return cl::Kernel(program, entry);
} }
void GSRendererCL::CL::AddDefs(ostringstream& opt) void GSRendererCL::CL::AddDefs(std::ostringstream& opt)
{ {
if(version == 110) opt << "-cl-std=CL1.1 "; if(version == 110) opt << "-cl-std=CL1.1 ";
else opt << "-cl-std=CL1.2 "; else opt << "-cl-std=CL1.2 ";
@ -2146,7 +2146,7 @@ cl::Kernel& GSRendererCL::CL::GetPrimKernel(const PrimSelector& sel)
sprintf(entry, "prim_%02x", sel.key); sprintf(entry, "prim_%02x", sel.key);
ostringstream opt; std::ostringstream opt;
opt << "-D KERNEL_PRIM=" << entry << " "; opt << "-D KERNEL_PRIM=" << entry << " ";
opt << "-D PRIM=" << sel.prim << " "; opt << "-D PRIM=" << sel.prim << " ";
@ -2173,7 +2173,7 @@ cl::Kernel& GSRendererCL::CL::GetTileKernel(const TileSelector& sel)
sprintf(entry, "tile_%02x", sel.key); sprintf(entry, "tile_%02x", sel.key);
ostringstream opt; std::ostringstream opt;
opt << "-D KERNEL_TILE=" << entry << " "; opt << "-D KERNEL_TILE=" << entry << " ";
opt << "-D PRIM=" << sel.prim << " "; opt << "-D PRIM=" << sel.prim << " ";
@ -2202,7 +2202,7 @@ cl::Kernel& GSRendererCL::CL::GetTFXKernel(const TFXSelector& sel)
sprintf(entry, "tfx_%016llx", sel.key); sprintf(entry, "tfx_%016llx", sel.key);
ostringstream opt; std::ostringstream opt;
opt << "-D KERNEL_TFX=" << entry << " "; opt << "-D KERNEL_TFX=" << entry << " ";
opt << "-D FPSM=" << sel.fpsm << " "; opt << "-D FPSM=" << sel.fpsm << " ";

View File

@ -194,8 +194,8 @@ class GSRendererCL : public GSRenderer
std::map<uint32, cl::Kernel> tile_map; std::map<uint32, cl::Kernel> tile_map;
std::map<uint64, cl::Kernel> tfx_map; std::map<uint64, cl::Kernel> tfx_map;
cl::Kernel Build(const char* entry, ostringstream& opt); cl::Kernel Build(const char* entry, std::ostringstream& opt);
void AddDefs(ostringstream& opt); void AddDefs(std::ostringstream& opt);
public: public:
std::vector<OCLDeviceDesc> devs; std::vector<OCLDeviceDesc> devs;