diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 20:22:56 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 20:22:56 +0100 |
| commit | 25f0315e918cf6f8c26b1e435c236ff1dbcbc6a5 (patch) | |
| tree | 805191d28c22edcaf31ffb03ba355f5fbbc1c3da /Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs | |
| parent | 0efc699e3d4cef2cb5b36223873fa5ad98177d1c (diff) | |
Visual Studio Reformat: Emby.Server.Implementations Part T-T
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs')
| -rw-r--r-- | Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs index f457bf490..e8da73c1c 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs @@ -67,22 +67,30 @@ namespace UniversalDetector.Core { int max = offset + len; - for (int i = offset; i < max && state == ProbingState.Detecting; i++) { - for (int j = activeSM - 1; j >= 0; j--) { + for (int i = offset; i < max && state == ProbingState.Detecting; i++) + { + for (int j = activeSM - 1; j >= 0; j--) + { // byte is feed to all active state machine int codingState = codingSM[j].NextState(buf[i]); - if (codingState == SMModel.ERROR) { + if (codingState == SMModel.ERROR) + { // got negative answer for this state machine, make it inactive activeSM--; - if (activeSM == 0) { + if (activeSM == 0) + { state = ProbingState.NotMe; return state; - } else if (j != activeSM) { + } + else if (j != activeSM) + { CodingStateMachine t = codingSM[activeSM]; codingSM[activeSM] = codingSM[j]; codingSM[j] = t; } - } else if (codingState == SMModel.ITSME) { + } + else if (codingState == SMModel.ITSME) + { state = ProbingState.FoundIt; detectedCharset = codingSM[j].ModelName; return state; |
