Files
UnrealEngineUWP/Engine/Source/Programs/DotNETCommon/DotNETUtilities/ArrayUtils.cs
ben marsh b6288ef6c1 UBT: Add a FileReference.WriteAllBytesIfModified() method to make it easier to update files without modifying the timestamp if they don't change.
#rb none
#jira

#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4957014 in //UE4/Release-4.22/... via CL 4968438
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)

[CL 5027724 by ben marsh in Dev-Anim branch]
2019-02-16 04:06:03 -05:00

36 lines
684 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tools.DotNETCommon
{
static class ArrayUtils
{
/// <summary>
/// Compares two byte arrays for equality
/// </summary>
/// <param name="A">The first byte array</param>
/// <param name="B">The second byte array</param>
/// <returns>True if the two arrays are equal, false otherwise</returns>
public static bool ByteArraysEqual(byte[] A, byte[] B)
{
if(A.Length != B.Length)
{
return false;
}
for(int Idx = 0; Idx < A.Length; Idx++)
{
if(A[Idx] != B[Idx])
{
return false;
}
}
return true;
}
}
}