cl_int setArg(cl_uint index, T value) { auto wrappedValue = WrapperPointer(new WrapperFor<T>(value)); indices.push_back(index); values.push_back(wrappedValue); return 0; }
IndicesList EditorMap::insertTile(const std::vector<iPnt>& dropPositions, const std::vector<Tile>& tiles) { //insertSheet(tiles[0].first); I32 offset = getOffset(tiles[0].first); IndicesList previousIndices; if (!mWorkingLayer) return previousIndices; for (I32 i = 0; i < tiles.size(); ++i) { if (!Exists(dropPositions[i].x(), dropPositions[i].y())) continue; previousIndices.push_back( getTile(dropPositions[i].x(), dropPositions[i].y(), mWorkingLayerIndex) ); mLayers[mWorkingLayerIndex][ dropPositions[i].y() * mWidth + dropPositions[i].x() ] = getTileOffset(tiles[i]); } mIsSaved = false; return previousIndices; }
void verifyArgumentsAt(IndicesIterator& indicesPosition, ValuesIterator& valuesPosition) { assertThat(indicesPosition).isEqualTo(indices.end()); assertThat(valuesPosition).isEqualTo(values.end()); }
void verifyArguments(ArgumentTypes... arguments) { auto firstIndex = indices.begin(); auto firstValue = values.begin(); verifyArgumentsAt(firstIndex, firstValue, arguments...); }