summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-10 18:41:42 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-10 22:37:55 -0400
commit1360f243ee7fa662c0ded25a9bc479aa47388446 (patch)
tree4e612c60d4e45386800e147e5d67366c61284d71 /src/mongo/db/pipeline
parentd7d1fdb75966c684e9a42150e6e9b69c4a10ee08 (diff)
downloadmongo-1360f243ee7fa662c0ded25a9bc479aa47388446.tar.gz
SERVER-17308 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/document.cpp5
-rw-r--r--src/mongo/db/pipeline/expression.h2
-rw-r--r--src/mongo/db/pipeline/value.cpp3
3 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/db/pipeline/document.cpp b/src/mongo/db/pipeline/document.cpp
index 4a54a5e614d..741834d39cf 100644
--- a/src/mongo/db/pipeline/document.cpp
+++ b/src/mongo/db/pipeline/document.cpp
@@ -31,7 +31,6 @@
#include "mongo/db/pipeline/document.h"
#include <boost/functional/hash.hpp>
-#include <boost/scoped_array.hpp>
#include "mongo/db/jsobj.h"
#include "mongo/db/pipeline/field_path.h"
@@ -146,7 +145,7 @@ namespace mongo {
uassert(16490, "Tried to make oversized document",
capacity <= size_t(BufferMaxSize));
- boost::scoped_array<char> oldBuf(_buffer);
+ std::unique_ptr<char[]> oldBuf(_buffer);
_buffer = new char[capacity];
_bufferEnd = _buffer + capacity - hashTabBytes();
@@ -211,7 +210,7 @@ namespace mongo {
}
DocumentStorage::~DocumentStorage() {
- boost::scoped_array<char> deleteBufferAtScopeEnd (_buffer);
+ std::unique_ptr<char[]> deleteBufferAtScopeEnd (_buffer);
for (DocumentStorageIterator it = iteratorAll(); !it.atEnd(); it.advance()) {
it->val.~Value(); // explicit destructor call
diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h
index 05891fe1592..d1f24408038 100644
--- a/src/mongo/db/pipeline/expression.h
+++ b/src/mongo/db/pipeline/expression.h
@@ -88,7 +88,7 @@ namespace mongo {
private:
Document _root;
- const boost::scoped_array<Value> _rest;
+ const std::unique_ptr<Value[]> _rest;
const size_t _numVars;
};
diff --git a/src/mongo/db/pipeline/value.cpp b/src/mongo/db/pipeline/value.cpp
index c949601ac4d..833d7ac23de 100644
--- a/src/mongo/db/pipeline/value.cpp
+++ b/src/mongo/db/pipeline/value.cpp
@@ -32,7 +32,6 @@
#include <cmath>
#include <boost/functional/hash.hpp>
-#include <boost/scoped_array.hpp>
#include "mongo/base/compare_numbers.h"
#include "mongo/db/jsobj.h"
@@ -124,7 +123,7 @@ namespace mongo {
const size_t totalLen = patternLen + 1/*middle NUL*/ + flagsLen;
// Need to copy since putString doesn't support scatter-gather.
- boost::scoped_array<char> buf (new char[totalLen]);
+ std::unique_ptr<char[]> buf (new char[totalLen]);
re.pattern.copyTo(buf.get(), true);
re.flags.copyTo(buf.get() + patternLen + 1, false); // no NUL
putString(StringData(buf.get(), totalLen));