/// <summary> /// 1a. Search for a bytewise equal patch, on same location. /// </summary> /// <param name="clipBoardPatch"></param> /// <param name="bank"></param> /// <param name="sameLocationPatch"></param> /// <returns></returns> private bool SearchByteWiseEqualPatchSameLocation(IClipBoardPatch clipBoardPatch, IBank bank, out IPatch sameLocationPatch) { sameLocationPatch = GetPatchOnSameLocation(clipBoardPatch, bank); if (sameLocationPatch != null) { if (sameLocationPatch.CalcByteDifferences(clipBoardPatch, true, 1) == 0) { clipBoardPatch.PasteDestination = sameLocationPatch; PcgClipBoard.ProtectedPatches.Add(sameLocationPatch); return(true); } } return(false); }