bool MatchPairs::initArrayFrom(MatchPairs& copyFrom) { MOZ_ASSERT(copyFrom.pairCount() > 0); if (!allocOrExpandArray(copyFrom.pairCount())) return false; PodCopy(pairs_, copyFrom.pairs_, pairCount_); return true; }
bool MatchPairs::initArrayFrom(MatchPairs ©From) { JS_ASSERT(copyFrom.pairCount() > 0); if (!allocOrExpandArray(copyFrom.pairCount())) return false; for (size_t i = 0; i < pairCount_; i++) { JS_ASSERT(copyFrom[i].check()); pairs_[i].start = copyFrom[i].start; pairs_[i].limit = copyFrom[i].limit; } return true; }