Bug 1166955 - Stop including nsAutoPtr.h from BasePin.cpp. r=jesup

MozReview-Commit-ID: CCvJyVmH1JI

--HG--
extra : rebase_source : 72cf22b38f7c4d3ef5c315351f0eca942345b752
This commit is contained in:
Masatoshi Kimura 2017-06-03 17:59:29 +09:00
Родитель 3ca924f469
Коммит a39099bca1
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -5,7 +5,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <assert.h>
#include "nsAutoPtr.h"
#include <algorithm>
#include "BasePin.h"
namespace mozilla {
@ -214,7 +214,7 @@ BasePin::QueryPinInfo(PIN_INFO * aInfo)
if (!mName.empty()) {
// Copy at most (max_buffer_size - sizeof(WCHAR)). The -1 is there to
// ensure we always have a null terminator.
unsigned int len = PR_MIN((MAX_PIN_NAME-1)*sizeof(WCHAR), (sizeof(WCHAR)*mName.length()));
size_t len = std::min<size_t>(MAX_PIN_NAME - 1, mName.length()) * sizeof(WCHAR);
memcpy(aInfo->achName, mName.data(), len);
}
@ -276,7 +276,7 @@ BasePin::EnumMediaTypes(IEnumMediaTypes **aEnum)
return E_OUTOFMEMORY;
// Must addref, caller's responsibility to release.
NS_ADDREF(*aEnum);
(*aEnum)->AddRef();
return S_OK;
}