mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +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:
@@ -24,8 +24,6 @@
|
||||
#endif
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void calc_test_size_descriptors(sizevec_t* sizes, size_t nsizes)
|
||||
{
|
||||
// Need to limit array size according to GL device properties
|
||||
@@ -33,14 +31,14 @@ void calc_test_size_descriptors(sizevec_t* sizes, size_t nsizes)
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
|
||||
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &maxTextureBufferSize);
|
||||
|
||||
size = min(maxTextureSize, maxTextureBufferSize);
|
||||
size = std::min(maxTextureSize, maxTextureBufferSize);
|
||||
|
||||
RandomSeed seed(gRandomSeed);
|
||||
|
||||
// Generate some random sizes (within reasonable ranges)
|
||||
for (size_t i = 0; i < nsizes; i++)
|
||||
{
|
||||
sizes[i].width = random_in_range(2, min(size, 1 << (i + 4)), seed);
|
||||
sizes[i].width = random_in_range(2, std::min(size, 1 << (i + 4)), seed);
|
||||
sizes[i].height = 1;
|
||||
sizes[i].depth = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user