1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsTObserverArray.h"
9 void nsTObserverArray_base::AdjustIterators(index_type aModPos
,
10 diff_type aAdjustment
) {
11 MOZ_ASSERT(aAdjustment
== -1 || aAdjustment
== 1, "invalid adjustment");
12 Iterator_base
* iter
= mIterators
;
14 if (iter
->mPosition
> aModPos
) {
15 iter
->mPosition
+= aAdjustment
;
21 void nsTObserverArray_base::ClearIterators() {
22 Iterator_base
* iter
= mIterators
;