Skip to content

Commit db8d917

Browse files
authored
Replace std::default_random_engine with std::mt19937 (rolling) (#2843)
Signed-off-by: keeponoiro <[email protected]>
1 parent 8d44b95 commit db8d917

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rclcpp_action/src/client_base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ClientBaseImpl
181181
std::recursive_mutex cancel_requests_mutex;
182182

183183
std::independent_bits_engine<
184-
std::default_random_engine, 8, unsigned int> random_bytes_generator;
184+
std::mt19937, 8, unsigned int> random_bytes_generator;
185185
};
186186

187187
ClientBase::ClientBase(

rclcpp_action/test/test_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ TEST(TestActionTypes, goal_uuid_to_hashed_uuid_random) {
6767
// Use std::random_device to seed the generator of goal IDs.
6868
std::random_device rd;
6969
std::independent_bits_engine<
70-
std::default_random_engine, 8, decltype(rd())> random_bytes_generator(rd());
70+
std::mt19937, 8, decltype(rd())> random_bytes_generator(rd());
7171

7272
std::vector<size_t> hashed_guuids;
7373
constexpr size_t iterations = 1000;

0 commit comments

Comments
 (0)