summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-09-01 12:00:47 -0400
committerDavid Storch <david.storch@10gen.com>2016-09-08 22:43:36 -0400
commit0f695019bd0b736e0aac0c510290175f0ec8f274 (patch)
tree0a7e318bbb2753e2ac082e799a940d2c62125e72 /src/mongo/scripting
parentf0df1d05b6098bfc01d0351e6867f044542d3b39 (diff)
downloadmongo-0f695019bd0b736e0aac0c510290175f0ec8f274.tar.gz
SERVER-25865 stdx::unordered_map and stdx::unordered_set
On Windows, these are aliases for boost containers. On other platforms they are aliases for std containers.
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/deadline_monitor.h2
-rw-r--r--src/mongo/scripting/mozjs/countdownlatch.cpp5
-rw-r--r--src/mongo/scripting/mozjs/engine.h4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/scripting/deadline_monitor.h b/src/mongo/scripting/deadline_monitor.h
index 9a68b78e60f..cd5c532c974 100644
--- a/src/mongo/scripting/deadline_monitor.h
+++ b/src/mongo/scripting/deadline_monitor.h
@@ -172,7 +172,7 @@ private:
}
}
- using TaskDeadlineMap = std::unordered_map<_Task*, Date_t>;
+ using TaskDeadlineMap = stdx::unordered_map<_Task*, Date_t>;
TaskDeadlineMap _tasks; // map of running tasks with deadlines
stdx::mutex _deadlineMutex; // protects all non-const members, except _monitorThread
stdx::condition_variable _newDeadlineAvailable; // Signaled for timeout, start and stop
diff --git a/src/mongo/scripting/mozjs/countdownlatch.cpp b/src/mongo/scripting/mozjs/countdownlatch.cpp
index 9ca93be7618..4d953a11449 100644
--- a/src/mongo/scripting/mozjs/countdownlatch.cpp
+++ b/src/mongo/scripting/mozjs/countdownlatch.cpp
@@ -30,12 +30,11 @@
#include "mongo/scripting/mozjs/countdownlatch.h"
-#include <unordered_map>
-
#include "mongo/scripting/mozjs/implscope.h"
#include "mongo/scripting/mozjs/objectwrapper.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
namespace mozjs {
@@ -119,7 +118,7 @@ private:
return iter->second;
}
- using Map = std::unordered_map<int32_t, std::shared_ptr<Latch>>;
+ using Map = stdx::unordered_map<int32_t, std::shared_ptr<Latch>>;
stdx::mutex _mutex;
Map _latches;
diff --git a/src/mongo/scripting/mozjs/engine.h b/src/mongo/scripting/mozjs/engine.h
index 9b3178912e7..8d6cf201e5f 100644
--- a/src/mongo/scripting/mozjs/engine.h
+++ b/src/mongo/scripting/mozjs/engine.h
@@ -29,11 +29,11 @@
#pragma once
#include <jsapi.h>
-#include <unordered_map>
#include "mongo/scripting/deadline_monitor.h"
#include "mongo/scripting/engine.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/mutex.h"
namespace mongo {
@@ -89,7 +89,7 @@ private:
*/
stdx::mutex _globalInterruptLock;
- using OpIdToScopeMap = std::unordered_map<unsigned, MozJSImplScope*>;
+ using OpIdToScopeMap = stdx::unordered_map<unsigned, MozJSImplScope*>;
OpIdToScopeMap _opToScopeMap; // map of mongo op ids to scopes (protected by
// _globalInterruptLock).