This commit is contained in:
2023-11-11 23:08:32 -07:00
parent 0a940b4cee
commit 669762bdc9
20 changed files with 108 additions and 118 deletions

View File

@ -124,14 +124,14 @@ internal abstract class Location
{
RectangleF? result;
int length = (locationDigits - 1) / 4;
string[] segments = new string[]
{
string[] segments =
[
wholePercentages[..1],
wholePercentages.Substring(1, length),
wholePercentages.Substring(3, length),
wholePercentages.Substring(5, length),
wholePercentages.Substring(7, length)
};
];
if (string.Join(string.Empty, segments) != wholePercentages)
result = null;
else
@ -247,7 +247,7 @@ internal abstract class Location
internal static List<Models.Location> GetLocations<T>(List<LocationContainer<T>> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum)
{
List<Models.Location> results = new();
List<Models.Location> results = [];
bool any;
bool matches;
float? percent;
@ -331,7 +331,7 @@ internal abstract class Location
internal static List<Models.Face> FilterByIntersect(Models.Face[] faces, float rectangleIntersectMinimum, int wholePercentages)
{
List<Models.Face> results = new();
List<Models.Face> results = [];
float? percent;
int width, height;
int faceLocationWholePercentages;