summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/threads.cpp6
-rw-r--r--src/support/utilities.h5
2 files changed, 3 insertions, 8 deletions
diff --git a/src/support/threads.cpp b/src/support/threads.cpp
index bd026b69c..e61769a84 100644
--- a/src/support/threads.cpp
+++ b/src/support/threads.cpp
@@ -49,7 +49,7 @@ namespace wasm {
Thread::Thread(ThreadPool* parent) : parent(parent) {
assert(!parent->isRunning());
- thread = make_unique<std::thread>(mainLoop, this);
+ thread = std::make_unique<std::thread>(mainLoop, this);
}
Thread::~Thread() {
@@ -124,7 +124,7 @@ void ThreadPool::initialize(size_t num) {
resetThreadsAreReady();
for (size_t i = 0; i < num; i++) {
try {
- threads.emplace_back(make_unique<Thread>(this));
+ threads.emplace_back(std::make_unique<Thread>(this));
} catch (std::system_error&) {
// failed to create a thread - don't use multithreading, as if num cores
// == 1
@@ -156,7 +156,7 @@ ThreadPool* ThreadPool::get() {
std::lock_guard<std::mutex> poolLock(creationMutex);
if (!pool) {
DEBUG_POOL("::get() creating\n");
- std::unique_ptr<ThreadPool> temp = make_unique<ThreadPool>();
+ std::unique_ptr<ThreadPool> temp = std::make_unique<ThreadPool>();
temp->initialize(getNumCores());
// assign it to the global location now that it is all ready
pool.swap(temp);
diff --git a/src/support/utilities.h b/src/support/utilities.h
index abff70453..ca2e1b89b 100644
--- a/src/support/utilities.h
+++ b/src/support/utilities.h
@@ -56,11 +56,6 @@ inline size_t alignAddr(size_t address, size_t alignment) {
return ((address + alignment - 1) & ~(alignment - 1));
}
-template<typename T, typename... Args>
-std::unique_ptr<T> make_unique(Args&&... args) {
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-
// For fatal errors which could arise from input (i.e. not assertion failures)
class Fatal {
private: