Fix build warnings for fun
This commit is contained in:
@@ -126,7 +126,7 @@ public sealed class CharacterAnalyzer : DisposableMediatorSubscriberBase
|
||||
Logger.LogWarning(ex, "Could not identify extension for {path}", filePath);
|
||||
}
|
||||
|
||||
var tris = await _xivDataAnalyzer.GetTrianglesByHash(fileEntry.Hash).ConfigureAwait(false);
|
||||
var tris = await Task.Run(() => _xivDataAnalyzer.GetTrianglesByHash(fileEntry.Hash)).ConfigureAwait(false);
|
||||
|
||||
foreach (var entry in fileCacheEntries)
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ public sealed class PairAnalyzer : DisposableMediatorSubscriberBase
|
||||
Logger.LogWarning(ex, "Could not identify extension for {path}", filePath);
|
||||
}
|
||||
|
||||
var tris = await _xivDataAnalyzer.GetTrianglesByHash(fileEntry.Hash).ConfigureAwait(false);
|
||||
var tris = await Task.Run(() => _xivDataAnalyzer.GetTrianglesByHash(fileEntry.Hash)).ConfigureAwait(false);
|
||||
|
||||
foreach (var entry in fileCacheEntries)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PlayerPerformanceService : DisposableMediatorSubscriberBase
|
||||
|
||||
foreach (var hash in moddedModelHashes)
|
||||
{
|
||||
triUsage += await _xivDataAnalyzer.GetTrianglesByHash(hash).ConfigureAwait(false);
|
||||
triUsage += await Task.Run(() => _xivDataAnalyzer.GetTrianglesByHash(hash)).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
pair.LastAppliedDataTris = triUsage;
|
||||
@@ -208,7 +208,7 @@ public class PlayerPerformanceService : DisposableMediatorSubscriberBase
|
||||
if (fileEntry == null) return;
|
||||
if (fileEntry.IsSubstEntry) return;
|
||||
|
||||
var texFormat = await _xivDataAnalyzer.GetTexFormatByHash(hash);
|
||||
var texFormat = await Task.Run(() => _xivDataAnalyzer.GetTexFormatByHash(hash));
|
||||
var filePath = fileEntry.ResolvedFilepath;
|
||||
var tmpFilePath = _fileCacheManager.GetSubstFilePath(Guid.NewGuid().ToString(), "tmp");
|
||||
var newFilePath = _fileCacheManager.GetSubstFilePath(hash, "tex");
|
||||
|
||||
@@ -153,7 +153,7 @@ public sealed class XivDataAnalyzer
|
||||
return output;
|
||||
}
|
||||
|
||||
public async Task<long> GetTrianglesByHash(string hash)
|
||||
public long GetTrianglesByHash(string hash)
|
||||
{
|
||||
if (_configService.Current.TriangleDictionary.TryGetValue(hash, out var cachedTris) && cachedTris > 0)
|
||||
return cachedTris;
|
||||
@@ -215,7 +215,7 @@ public sealed class XivDataAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<(uint Format, int MipCount, ushort Width, ushort Height)> GetTexFormatByHash(string hash)
|
||||
public (uint Format, int MipCount, ushort Width, ushort Height) GetTexFormatByHash(string hash)
|
||||
{
|
||||
if (_configService.Current.TexDictionary.TryGetValue(hash, out var cachedTex) && cachedTex.Mip0Size > 0)
|
||||
return cachedTex;
|
||||
|
||||
Reference in New Issue
Block a user