michael@0: michael@0: /* michael@0: * Copyright 2011 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #include "SkOpArray.h" michael@0: michael@0: SkOpArray::SkOpArray() : fType(SkOperand2::kNoType) { michael@0: } michael@0: michael@0: SkOpArray::SkOpArray(SkOperand2::OpType type) : fType(type) { michael@0: } michael@0: michael@0: bool SkOpArray::getIndex(int index, SkOperand2* operand) { michael@0: if (index >= count()) { michael@0: SkASSERT(0); michael@0: return false; michael@0: } michael@0: *operand = begin()[index]; michael@0: return true; michael@0: }