diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2019-07-01 21:39:22 -0500 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-07-02 04:39:22 +0200 |
| commit | b2b736abc2569ab5d8199da666aef8d8394844a0 (patch) | |
| tree | 88bcc2ae4fb0d4161c95df2cd7edb12388de922a /ChocolArm64/Translation/TranslatorCache.cs | |
| parent | 10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff) | |
Misc cleanup (#708)
* Fix typos
* Remove unneeded using statements
* Enforce var style more
* Remove redundant qualifiers
* Fix some indentation
* Disable naming warnings on files with external enum names
* Fix build
* Mass find & replace for comments with no spacing
* Standardize todo capitalization and for/if spacing
Diffstat (limited to 'ChocolArm64/Translation/TranslatorCache.cs')
| -rw-r--r-- | ChocolArm64/Translation/TranslatorCache.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ChocolArm64/Translation/TranslatorCache.cs b/ChocolArm64/Translation/TranslatorCache.cs index d10d6757..cf6510ad 100644 --- a/ChocolArm64/Translation/TranslatorCache.cs +++ b/ChocolArm64/Translation/TranslatorCache.cs @@ -8,13 +8,13 @@ namespace ChocolArm64.Translation { class TranslatorCache { - //Maximum size of the cache, the unit used is completely arbitrary. + // Maximum size of the cache, the unit used is completely arbitrary. private const int MaxTotalSize = 0x800000; - //Minimum time required in milliseconds for a method to be eligible for deletion. + // Minimum time required in milliseconds for a method to be eligible for deletion. private const int MinTimeDelta = 2 * 60000; - //Minimum number of calls required to update the timestamp. + // Minimum number of calls required to update the timestamp. private const int MinCallCountForUpdate = 250; private class CacheBucket @@ -122,10 +122,10 @@ namespace ChocolArm64.Translation { try { - //The bucket value on the dictionary may have changed between the - //time we get the value from the dictionary, and we acquire the - //lock. So we need to ensure we are working with the latest value, - //we can do that by getting the value again, inside the lock. + // The bucket value on the dictionary may have changed between the + // time we get the value from the dictionary, and we acquire the + // lock. So we need to ensure we are working with the latest value, + // we can do that by getting the value again, inside the lock. if (_cache.TryGetValue(position, out CacheBucket latestBucket)) { latestBucket.CallCount = 0; |
