refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -16,13 +16,11 @@ namespace Cryville.Common.Font {
|
||||
}
|
||||
public void Close() { Reader.Close(); }
|
||||
|
||||
public static FontFile Create(FileInfo file) {
|
||||
switch (file.Extension) {
|
||||
case ".ttf": case ".otf": return new FontFileTTF(file);
|
||||
case ".ttc": case ".otc": return new FontFileTTC(file);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
public static FontFile Create(FileInfo file) => file.Extension switch {
|
||||
".ttf" or ".otf" => new FontFileTTF(file),
|
||||
".ttc" or ".otc" => new FontFileTTC(file),
|
||||
_ => null,
|
||||
};
|
||||
|
||||
public Enumerator GetEnumerator() {
|
||||
return new Enumerator(this);
|
||||
@@ -42,7 +40,7 @@ namespace Cryville.Common.Font {
|
||||
_index = -1;
|
||||
}
|
||||
|
||||
public Typeface Current {
|
||||
public readonly Typeface Current {
|
||||
get {
|
||||
if (_index < 0)
|
||||
throw new InvalidOperationException(_index == -1 ? "Enum not started" : "Enum ended");
|
||||
@@ -50,7 +48,7 @@ namespace Cryville.Common.Font {
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current { get { return Current; } }
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
public void Dispose() {
|
||||
_index = -2;
|
||||
|
Reference in New Issue
Block a user