Skip to content

Commit

Permalink
[FIX] Fixed typo in vpUniRand::shuffleVector
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGNEAU Romain committed Sep 11, 2024
1 parent eb76327 commit 68b5953
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core/include/visp3/core/vpUniRand.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ class VISP_EXPORT vpUniRand
inline static std::vector<T> shuffleVector(const std::vector<T> &inputVector, const int32_t &seed = -1)
{
std::vector<T> shuffled = inputVector;
#if (VISP_CXX_STANDARD <= VISP_CXX_STANDARD_11)
#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
if (seed > 0) {
std::srand(seed);
}
else {
std::srand(std::time(0))
}
std::srand(std::time(0));
}
std::random_shuffle(shuffled.begin(), shuffled.end());
#else
if (seed < 0) {
Expand All @@ -165,7 +165,7 @@ class VISP_EXPORT vpUniRand
}
#endif
return shuffled;
}
}

private:
struct vpPcgStateSetSeq64t
Expand Down

0 comments on commit 68b5953

Please sign in to comment.