mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 15:39:03 +00:00
remove using namespace std and use std namespace explicitly (#2125)
Removes `using namespace std` and adds `std::` explicitly instead, which is usually on calls to `min`. This is generally best practice, and it also might be helpful when there are the same function names in the std namespace and in the global namespace (e.g. #1833).
This commit is contained in:
@@ -42,16 +42,15 @@ const std::string spvVersionSkipArg = "--skip-spirv-version-check";
|
||||
|
||||
std::vector<unsigned char> readBinary(const char *file_name)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
ifstream file(file_name, ios::in | ios::binary | ios::ate);
|
||||
std::ifstream file(file_name,
|
||||
std::ios::in | std::ios::binary | std::ios::ate);
|
||||
|
||||
std::vector<char> tmpBuffer(0);
|
||||
|
||||
if (file.is_open()) {
|
||||
size_t size = file.tellg();
|
||||
tmpBuffer.resize(size);
|
||||
file.seekg(0, ios::beg);
|
||||
file.seekg(0, std::ios::beg);
|
||||
file.read(&tmpBuffer[0], size);
|
||||
file.close();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user