From 25f0315e918cf6f8c26b1e435c236ff1dbcbc6a5 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 20:22:56 +0100 Subject: Visual Studio Reformat: Emby.Server.Implementations Part T-T --- .../UniversalDetector/Core/EscCharsetProber.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs') 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; -- cgit v1.2.3