From a8ce324b71a7e9186ed5b41686042be2b2a8c66c Mon Sep 17 00:00:00 2001 From: xiehan <52160700+Barenboim@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:24:08 +0800 Subject: [PATCH] random() -> rand(). (#1663) --- src/factory/WFAlgoTaskFactory.inl | 2 +- src/nameservice/UpstreamPolicies.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory/WFAlgoTaskFactory.inl b/src/factory/WFAlgoTaskFactory.inl index 746b321cfd..46c58f799f 100644 --- a/src/factory/WFAlgoTaskFactory.inl +++ b/src/factory/WFAlgoTaskFactory.inl @@ -433,7 +433,7 @@ protected: virtual void execute() { std::shuffle(this->input.first, this->input.last, - std::mt19937_64(random())); + std::mt19937_64(rand())); this->output.first = this->input.first; this->output.last = this->input.last; } diff --git a/src/nameservice/UpstreamPolicies.cc b/src/nameservice/UpstreamPolicies.cc index 6d416329db..f6fd9364d8 100644 --- a/src/nameservice/UpstreamPolicies.cc +++ b/src/nameservice/UpstreamPolicies.cc @@ -30,7 +30,7 @@ class EndpointGroup public: EndpointGroup(int group_id, UPSGroupPolicy *policy) : mutex(PTHREAD_MUTEX_INITIALIZER), - gen(random()) + gen(rand()) { this->id = group_id; this->policy = policy;