Skip to content
Snippets Groups Projects
Commit e8355fe8 authored by Tom Fischer's avatar Tom Fischer Committed by GitHub
Browse files

Added namespace `std` before function `rand`.

parent 6d5bd133
No related branches found
No related tags found
No related merge requests found
...@@ -30,15 +30,15 @@ TEST(GeoLib, DuplicateGeometry) ...@@ -30,15 +30,15 @@ TEST(GeoLib, DuplicateGeometry)
// generate points // generate points
std::srand ( static_cast<unsigned>(std::time(nullptr)) ); std::srand ( static_cast<unsigned>(std::time(nullptr)) );
std::size_t n_pnts (rand() % 1000 + 100); std::size_t n_pnts (rand() % 1000 + 100);
int box_size (rand()); int box_size (std::rand());
double half_box_size(box_size/2); double half_box_size(box_size/2);
std::unique_ptr<std::vector<GeoLib::Point*>> pnts (new std::vector<GeoLib::Point*>); std::unique_ptr<std::vector<GeoLib::Point*>> pnts (new std::vector<GeoLib::Point*>);
pnts->reserve(n_pnts); pnts->reserve(n_pnts);
for (int k(0); k<n_pnts; k++) { for (int k(0); k<n_pnts; k++) {
pnts->push_back(new GeoLib::Point( pnts->push_back(new GeoLib::Point(
rand() % box_size - half_box_size, std::rand() % box_size - half_box_size,
rand() % box_size - half_box_size, std::rand() % box_size - half_box_size,
rand() % box_size - half_box_size)); std::rand() % box_size - half_box_size));
} }
geo.addPointVec(std::move(pnts), input_name); geo.addPointVec(std::move(pnts), input_name);
std::string output ("output_geometry"); std::string output ("output_geometry");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment