@Override
	public void delete(Set<Integer> ordinals) {

		if (ordinals.isEmpty()) {
			return;
		}

		if (ordinals.size() == 1) {
			ordinals.forEach(ordinal -> delete(ordinal));
			return;
		}

		TreeSet<Integer> sortedOrdinals = new TreeSet<>(ordinals);
		int firstOrdinal = sortedOrdinals.first();
		int lastOrdinal = sortedOrdinals.last();
		if (firstOrdinal < 0 || lastOrdinal >= numComponents) {
			throw new IndexOutOfBoundsException(ordinals.size() + " ordinals specified");
		}

		Integer nextOrdinal = firstOrdinal;

		int ordinalAdjustment = 0;
		int offsetAdjustment = 0;
		int lastDefinedOrdinal = -1;

		boolean isPacked = isPackingEnabled();

		boolean bitFieldRemoved = false;

		List<DataTypeComponentImpl> newComponents = new ArrayList<>(components.size());

		for (DataTypeComponentImpl dtc : components) {
			int ordinal = dtc.getOrdinal();
			if (!isPacked && nextOrdinal != null && nextOrdinal < ordinal) {
				// Identify removed filler since last defined component
				SortedSet<Integer> removedFillerSet =
					sortedOrdinals.subSet(lastDefinedOrdinal + 1, ordinal);
				if (!removedFillerSet.isEmpty()) {
					int undefinedRemoveCount = removedFillerSet.size();
					ordinalAdjustment -= undefinedRemoveCount;
					offsetAdjustment -= undefinedRemoveCount;
					nextOrdinal = sortedOrdinals.higher(removedFillerSet.last());
				}
			}
			if (nextOrdinal != null && nextOrdinal == ordinal) {
				// defined component removed
				if (dtc.isBitFieldComponent()) {
					// defer reconciling bitfield space to repack
					bitFieldRemoved = true;
				}
				else {
					offsetAdjustment -= dtc.getLength();
				}
				--ordinalAdjustment;
				lastDefinedOrdinal = ordinal;
				nextOrdinal = sortedOrdinals.higher(ordinal);
			}
			else {

				if (ordinalAdjustment != 0) {
					shiftOffset(dtc, ordinalAdjustment, offsetAdjustment);
				}
				newComponents.add(dtc);
				lastDefinedOrdinal = ordinal;
			}
		}
		if (!isPacked) {
			// Identify removed filler after last defined component
			Set<Integer> removedFillerSet =
				sortedOrdinals.subSet(lastDefinedOrdinal + 1, numComponents);
			if (!removedFillerSet.isEmpty()) {
				int undefinedRemoveCount = removedFillerSet.size();
				ordinalAdjustment -= undefinedRemoveCount;
				offsetAdjustment -= undefinedRemoveCount;
			}
		}

		components = newComponents;
		numComponents += ordinalAdjustment;

		if (isPacked) {
			repack(true);
		}
		else {
			structLength += offsetAdjustment;
			if (bitFieldRemoved) {
				repack(false);
			}
			notifySizeChanged();
		}
	}
Removes a defined component at the specified index.
If this corresponds to a zero-length or bit-field component it will 
be cleared without an offset shift to the remaining components.  Removal of
other component types will result in an offset and ordinal shift
to the remaining components.
@param index defined component index
@param disableOffsetShift if false, and component is not a bit-field, an offset shift
and possible structure length change will be performed for non-packed structure.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructureDataType.java