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

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

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

		lock.acquire();
		try {
			checkDeleted();

			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<DataTypeComponentDB> newComponents = new ArrayList<>(components.size());

			for (DataTypeComponentDB 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();
					}
					doDelete(dtc); // delete defined component record
					--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;
				}
			}

			// update numComponents only
			components = newComponents;
			updateComposite(numComponents + ordinalAdjustment, -1, -1, true);

			if (isPacked) {
				if (!repack(false, true)) {
					dataMgr.dataTypeChanged(this, false);
				}
			}
			else {
				// update length only
				updateComposite(-1, structLength + offsetAdjustment, -1, true);
				if (bitFieldRemoved) {
					repack(false, false);
				}
				notifySizeChanged(false);
			}
		}
		catch (IOException e) {
			dataMgr.dbError(e);
		}
		finally {
			lock.release();
		}
	}
Removes a defined component at the specified index.
<p>
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.  In the case of a non-packed
structure, the resulting shift will cause in a timestamp change for this structure.

@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/database/data/StructureDB.java