2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsArrayUtils.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// do_QueryElementAt helper stuff
|
|
|
|
//
|
|
|
|
nsresult
|
|
|
|
nsQueryArrayElementAt::operator()(const nsIID& aIID, void** aResult) const
|
2014-06-26 18:35:39 -07:00
|
|
|
{
|
|
|
|
nsresult status = mArray ? mArray->QueryElementAt(mIndex, aIID, aResult) :
|
|
|
|
NS_ERROR_NULL_POINTER;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-06-26 18:35:39 -07:00
|
|
|
if (mErrorPtr) {
|
|
|
|
*mErrorPtr = status;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
2014-06-26 18:35:39 -07:00
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|