/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=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/. */
// unfortunately, the API for nsReadingIterator requires that the // iterator know its start and end positions. this was needed when // we supported multi-fragment strings, but now it is really just // extra baggage. we should remove mStart and mEnd at some point.
NS_ASSERTION(step < 0, "can't advance (backward) a reading iterator beyond the end " "of a string");
mPosition += step;
} return *this;
}
// We return an unsigned type here (with corresponding assert) rather than // the more usual difference_type because we want to make this class go // away in favor of mozilla::RangedPtr. Since RangedPtr has the same // requirement we are enforcing here, the transition ought to be much // smoother.
size_type operator-(const self_type& aOther) const {
MOZ_ASSERT(mPosition >= aOther.mPosition); return mPosition - aOther.mPosition;
}
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.