diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2018-12-06 05:16:24 -0600 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-12-06 09:16:24 -0200 |
| commit | fb1d9493a3d43f2b86c551682586905a1f0e9ea7 (patch) | |
| tree | d842685ff5bdd45d11d94bd1a45a002b9d532fe7 /Ryujinx.HLE/Loaders/Elf | |
| parent | 3615a70cae3f89197fe185dfc5d0a47fa42151d9 (diff) | |
Adjust naming conventions and general refactoring in HLE Project (#527)
* Rename enum fields
* Naming conventions
* Remove unneeded ".this"
* Remove unneeded semicolons
* Remove unused Usings
* Don't use var
* Remove unneeded enum underlying types
* Explicitly label class visibility
* Remove unneeded @ prefixes
* Remove unneeded commas
* Remove unneeded if expressions
* Method doesn't use unsafe code
* Remove unneeded casts
* Initialized objects don't need an empty constructor
* Remove settings from DotSettings
* Revert "Explicitly label class visibility"
This reverts commit ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51.
* Small changes
* Revert external enum renaming
* Changes from feedback
* Apply previous refactorings to the merged code
Diffstat (limited to 'Ryujinx.HLE/Loaders/Elf')
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfDynamic.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfDynamicTag.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfSymbol.cs | 36 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfSymbolBinding.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfSymbolType.cs | 14 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Elf/ElfSymbolVisibility.cs | 8 |
6 files changed, 38 insertions, 35 deletions
diff --git a/Ryujinx.HLE/Loaders/Elf/ElfDynamic.cs b/Ryujinx.HLE/Loaders/Elf/ElfDynamic.cs index fb0ea53e..f489e85a 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfDynamic.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfDynamic.cs @@ -6,10 +6,10 @@ namespace Ryujinx.HLE.Loaders.Elf public long Value { get; private set; } - public ElfDynamic(ElfDynamicTag Tag, long Value) + public ElfDynamic(ElfDynamicTag tag, long value) { - this.Tag = Tag; - this.Value = Value; + Tag = tag; + Value = value; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/Loaders/Elf/ElfDynamicTag.cs b/Ryujinx.HLE/Loaders/Elf/ElfDynamicTag.cs index 9d7ad72e..eb37d612 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfDynamicTag.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfDynamicTag.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace Ryujinx.HLE.Loaders.Elf { + [SuppressMessage("ReSharper", "InconsistentNaming")] enum ElfDynamicTag { DT_NULL = 0, diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbol.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbol.cs index 3f3a2a79..b655816f 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbol.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbol.cs @@ -9,32 +9,32 @@ namespace Ryujinx.HLE.Loaders.Elf public ElfSymbolVisibility Visibility { get; private set; } public bool IsFuncOrObject => - Type == ElfSymbolType.STT_FUNC || - Type == ElfSymbolType.STT_OBJECT; + Type == ElfSymbolType.SttFunc || + Type == ElfSymbolType.SttObject; public bool IsGlobalOrWeak => - Binding == ElfSymbolBinding.STB_GLOBAL || - Binding == ElfSymbolBinding.STB_WEAK; + Binding == ElfSymbolBinding.StbGlobal || + Binding == ElfSymbolBinding.StbWeak; - public int SHIdx { get; private set; } + public int ShIdx { get; private set; } public long Value { get; private set; } public long Size { get; private set; } public ElfSymbol( - string Name, - int Info, - int Other, - int SHIdx, - long Value, - long Size) + string name, + int info, + int other, + int shIdx, + long value, + long size) { - this.Name = Name; - this.Type = (ElfSymbolType)(Info & 0xf); - this.Binding = (ElfSymbolBinding)(Info >> 4); - this.Visibility = (ElfSymbolVisibility)Other; - this.SHIdx = SHIdx; - this.Value = Value; - this.Size = Size; + Name = name; + Type = (ElfSymbolType)(info & 0xf); + Binding = (ElfSymbolBinding)(info >> 4); + Visibility = (ElfSymbolVisibility)other; + ShIdx = shIdx; + Value = value; + Size = size; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbolBinding.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbolBinding.cs index 3c915311..92274fde 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbolBinding.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbolBinding.cs @@ -2,8 +2,8 @@ namespace Ryujinx.HLE.Loaders.Elf { enum ElfSymbolBinding { - STB_LOCAL = 0, - STB_GLOBAL = 1, - STB_WEAK = 2 + StbLocal = 0, + StbGlobal = 1, + StbWeak = 2 } }
\ No newline at end of file diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbolType.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbolType.cs index f22e6c45..4110d4c3 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbolType.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbolType.cs @@ -2,12 +2,12 @@ namespace Ryujinx.HLE.Loaders.Elf { enum ElfSymbolType { - STT_NOTYPE = 0, - STT_OBJECT = 1, - STT_FUNC = 2, - STT_SECTION = 3, - STT_FILE = 4, - STT_COMMON = 5, - STT_TLS = 6 + SttNoType = 0, + SttObject = 1, + SttFunc = 2, + SttSection = 3, + SttFile = 4, + SttCommon = 5, + SttTls = 6 } }
\ No newline at end of file diff --git a/Ryujinx.HLE/Loaders/Elf/ElfSymbolVisibility.cs b/Ryujinx.HLE/Loaders/Elf/ElfSymbolVisibility.cs index 4bec50a3..f026fca8 100644 --- a/Ryujinx.HLE/Loaders/Elf/ElfSymbolVisibility.cs +++ b/Ryujinx.HLE/Loaders/Elf/ElfSymbolVisibility.cs @@ -2,9 +2,9 @@ namespace Ryujinx.HLE.Loaders.Elf { enum ElfSymbolVisibility { - STV_DEFAULT = 0, - STV_INTERNAL = 1, - STV_HIDDEN = 2, - STV_PROTECTED = 3 + StvDefault = 0, + StvInternal = 1, + StvHidden = 2, + StvProtected = 3 } }
\ No newline at end of file |
