diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-10 19:54:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-10 19:54:18 -0500 |
| commit | 15c89d281e29578a752dd9828e12e6fa243621a8 (patch) | |
| tree | 49ad7b46cb06c844affe835e5ed7b8d87deebf4a /Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs | |
| parent | 3d867c2c46cec39b669bb8647efef677f32b8a8d (diff) | |
| parent | bd169e4fd4f5586ab8dad323a520cbcc10de54fe (diff) | |
Merge pull request #506 from hawken93/linting
Removing tabs and trailing whitespace
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs')
| -rw-r--r-- | Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs index 050a9d9ce..eac67fe95 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs @@ -43,25 +43,25 @@ namespace UniversalDetector.Core private EUCJPContextAnalyser contextAnalyser; private EUCJPDistributionAnalyser distributionAnalyser; private byte[] lastChar = new byte[2]; - + public EUCJPProber() { codingSM = new CodingStateMachine(new EUCJPSMModel()); distributionAnalyser = new EUCJPDistributionAnalyser(); - contextAnalyser = new EUCJPContextAnalyser(); + contextAnalyser = new EUCJPContextAnalyser(); Reset(); } - public override string GetCharsetName() + public override string GetCharsetName() { return "EUC-JP"; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState; int max = offset + len; - + for (int i = offset; i < max; i++) { codingState = codingSM.NextState(buf[i]); if (codingState == SMModel.ERROR) { @@ -83,7 +83,7 @@ namespace UniversalDetector.Core distributionAnalyser.HandleOneChar(buf, i-1, charLen); } } - } + } lastChar[0] = buf[max-1]; if (state == ProbingState.Detecting) if (contextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) @@ -93,18 +93,18 @@ namespace UniversalDetector.Core public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; contextAnalyser.Reset(); distributionAnalyser.Reset(); } - + public override float GetConfidence() { float contxtCf = contextAnalyser.GetConfidence(); float distribCf = distributionAnalyser.GetConfidence(); return (contxtCf > distribCf ? contxtCf : distribCf); } - + } } |
