mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Merge pull request #24194 from vrabaud:compilation_fix
* Fix compilation when forcing later C++. * Remove random_shuffle. * Remove random_shuffle.
This commit is contained in:
@@ -264,7 +264,8 @@ TEST(Objdetect_QRCode_Encode_Decode, regression)
|
||||
int true_capacity = establishCapacity(mode, version, cur_capacity);
|
||||
|
||||
std::string input_info = symbol_set;
|
||||
std::random_shuffle(input_info.begin(),input_info.end());
|
||||
std::mt19937 rand_gen {1};
|
||||
std::shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
int count = 0;
|
||||
if((int)input_info.length() > true_capacity)
|
||||
{
|
||||
@@ -390,15 +391,8 @@ TEST(Objdetect_QRCode_Encode_Decode_Structured_Append, DISABLED_regression)
|
||||
std::string symbol_set = config["symbols_set"];
|
||||
|
||||
std::string input_info = symbol_set;
|
||||
#if defined CV_CXX11
|
||||
// std::random_shuffle is deprecated since C++11 and removed in C++17.
|
||||
// Use manually constructed RNG with a fixed seed and std::shuffle instead.
|
||||
std::mt19937 rand_gen {1};
|
||||
std::shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
#else
|
||||
SeededRandFunctor<1> rand_gen;
|
||||
std::random_shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
#endif
|
||||
for (int j = min_stuctures_num; j < max_stuctures_num; j++)
|
||||
{
|
||||
QRCodeEncoder::Params params;
|
||||
|
||||
Reference in New Issue
Block a user