summaryrefslogtreecommitdiffstats
path: root/security/nss/cpputil/databuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/cpputil/databuffer.h')
-rw-r--r--security/nss/cpputil/databuffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/nss/cpputil/databuffer.h b/security/nss/cpputil/databuffer.h
index c8e5298c3..4bedd075d 100644
--- a/security/nss/cpputil/databuffer.h
+++ b/security/nss/cpputil/databuffer.h
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -22,6 +23,7 @@ class DataBuffer {
DataBuffer(const DataBuffer& other) : data_(nullptr), len_(0) {
Assign(other);
}
+ explicit DataBuffer(size_t l) : data_(nullptr), len_(0) { Allocate(l); }
~DataBuffer() { delete[] data_; }
DataBuffer& operator=(const DataBuffer& other) {