diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-13 12:14:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-13 12:14:53 -0500 |
| commit | 9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch) | |
| tree | 6ca1b2b3decac1a86b886dafd2645954a13601fd /Emby.Server.Implementations/TextEncoding/UniversalDetector/Core | |
| parent | 17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff) | |
| parent | b936c439321b55bf89c99dac96fc78cefe752e84 (diff) | |
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core')
3 files changed, 14 insertions, 30 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs index 484bbca36..34f24161d 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs @@ -77,14 +77,8 @@ namespace UniversalDetector.Core currentState = SMModel.START; } - public int CurrentCharLen - { - get { return currentCharLen; } - } + public int CurrentCharLen => currentCharLen; - public string ModelName - { - get { return model.Name; } - } + public string ModelName => model.Name; } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs index 451a3e59c..cb2f201aa 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs @@ -54,19 +54,15 @@ namespace UniversalDetector.Core public int[] charLenTable; private string name; - - public string Name { - get { return name; } - } + + public string Name => name; private int classFactor; - public int ClassFactor { - get { return classFactor; } - } + public int ClassFactor => classFactor; public SMModel(BitPackage classTable, int classFactor, - BitPackage stateTable, int[] charLenTable, String name) + BitPackage stateTable, int[] charLenTable, string name) { this.classTable = classTable; this.classFactor = classFactor; diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs index fc824b5a2..b813dda76 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs @@ -51,30 +51,24 @@ namespace UniversalDetector.Core // freqSeqs / totalSeqs protected float typicalPositiveRatio; + + public float TypicalPositiveRatio => typicalPositiveRatio; - public float TypicalPositiveRatio { - get { return typicalPositiveRatio; } - } - - // not used + // not used protected bool keepEnglishLetter; + + public bool KeepEnglishLetter => keepEnglishLetter; - public bool KeepEnglishLetter { - get { return keepEnglishLetter; } - } + protected string charsetName; - protected String charsetName; - - public string CharsetName { - get { return charsetName; } - } + public string CharsetName => charsetName; public SequenceModel( byte[] charToOrderMap, byte[] precedenceMatrix, float typicalPositiveRatio, bool keepEnglishLetter, - String charsetName) + string charsetName) { this.charToOrderMap = charToOrderMap; this.precedenceMatrix = precedenceMatrix; |
