mirror of
https://github.com/claunia/plist-cil.git
synced 2026-02-04 05:34:41 +00:00
[PR #43] [MERGED] Refactor the UID class #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/claunia/plist-cil/pull/43
Author: @qmfrederik
Created: 6/19/2018
Status: ✅ Merged
Merged: 6/22/2018
Merged by: @claunia
Base:
master← Head:fixes/uid📝 Commits (3)
5797a92UID: Store the value as an ulong instead of a byte array.22fbc6aFix serialization of UID values2b4fe65Refactur UIDs📊 Changes
5 files changed (+179 additions, -126 deletions)
View changed files
📝
plist-cil.test/UIDTests.cs(+14 -30)📝
plist-cil/BinaryPropertyListParser.cs(+1 -1)📝
plist-cil/BinaryPropertyListWriter.cs(+10 -0)📝
plist-cil/UID.cs(+153 -95)📝
plist-cil/plist-cil.csproj(+1 -0)📄 Description
In the end, a UID object is an reference to another object, by id. The value of UID is always positive (because it is an index). The maximum allowed value is
ulong.MaxValue.UIDs have no (meaningful) names; they are just numbers.
With this in mind:
ulonginstead of abyte[]array, preventing the allocation of an arrayintinstead ofuint)nameproperty alltogether.This helps, you have guessed it, performance, as it's easier to track a
ulongthan it is to track abyte[]:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.