Eliminate dependency on Boost.Random
Also replace use of std::random_shuffle (removed in C++17)
with std::shuffle.
Change-Id: I200a8a404e67447c547c9abfa1a5a55a18de9ef3
diff --git a/src/handles/base-handle.cpp b/src/handles/base-handle.cpp
index 76fa36c..8555f39 100644
--- a/src/handles/base-handle.cpp
+++ b/src/handles/base-handle.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2017, Regents of the University of California.
*
* This file is part of NDN repo-ng (Next generation of NDN repository).
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -19,14 +19,14 @@
#include "base-handle.hpp"
+#include <ndn-cxx/util/random.hpp>
+
namespace repo {
uint64_t
BaseHandle::generateProcessId()
{
- static boost::random::mt19937_64 gen;
- static boost::random::uniform_int_distribution<uint64_t> dist(0, 0xFFFFFFFFFFFFFFFFLL);
- return dist(gen);
+ return ndn::random::generateWord64();
}
-}
+} // namespace repo