1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Make objdetect/test C++11-compliant and reproducible

- Add conditional compilation directives to replace deprecated std::random_shuffle with new std::shuffle when C++11 is available.

- Set random seed to a fixed value before shuffling containers to ensure reproducibility.

Resolves opencv/opencv#22209.
This commit is contained in:
Rong Mantle Bao
2022-07-11 18:36:36 +08:00
parent 0a88f84847
commit 3135063100
2 changed files with 25 additions and 2 deletions
+6
View File
@@ -8,4 +8,10 @@
#include "opencv2/objdetect.hpp"
#include "opencv2/objdetect/objdetect_c.h"
#if defined CV_CXX11
#include <random>
#else
#include <cstdlib>
#endif
#endif