make fields readonly where possible in EmuHawk project
This commit is contained in:
parent
488409a2ad
commit
592cedba1d
|
@ -22,7 +22,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public sealed class FolderBrowserEx : Component
|
||||
{
|
||||
/// <remarks>is this supposed to be public? we're obviously not using it at callsites at the moment --yoshi</remarks>
|
||||
private Win32Imports.BROWSEINFO.FLAGS publicOptions = Win32Imports.BROWSEINFO.FLAGS.RestrictToFilesystem | Win32Imports.BROWSEINFO.FLAGS.RestrictToDomain;
|
||||
private readonly Win32Imports.BROWSEINFO.FLAGS publicOptions = Win32Imports.BROWSEINFO.FLAGS.RestrictToFilesystem | Win32Imports.BROWSEINFO.FLAGS.RestrictToDomain;
|
||||
|
||||
public string Description = "Please select a folder below:";
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
}
|
||||
|
||||
private IGL_GdiPlus Gdi;
|
||||
private readonly IGL_GdiPlus Gdi;
|
||||
|
||||
/// <summary>
|
||||
/// the control associated with this render target (if any)
|
||||
|
|
|
@ -714,7 +714,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
//HAMNUTS:
|
||||
//its not clear how many bindings we'll have to disable before we can enable the ones we need..
|
||||
//so lets just disable the ones we remember we have bound
|
||||
var currBindings = sVertexAttribEnables;
|
||||
var currBindings = _sVertexAttribEnables;
|
||||
foreach (var index in currBindings)
|
||||
GL.DisableVertexAttribArray(index);
|
||||
currBindings.Clear();
|
||||
|
@ -725,7 +725,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
UnbindVertexAttributes();
|
||||
|
||||
//HAMNUTS (continued)
|
||||
var currBindings = sVertexAttribEnables;
|
||||
var currBindings = _sVertexAttribEnables;
|
||||
sStateCurrentVertexLayout = sStatePendingVertexLayout;
|
||||
|
||||
if (layout == null) return;
|
||||
|
@ -815,13 +815,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
private int sActiveTexture;
|
||||
private VertexLayout sStateCurrentVertexLayout;
|
||||
private VertexLayout sStatePendingVertexLayout;
|
||||
private HashSet<int> sVertexAttribEnables = new HashSet<int>();
|
||||
private readonly HashSet<int> _sVertexAttribEnables = new HashSet<int>();
|
||||
|
||||
private void PurgeStateCache()
|
||||
{
|
||||
sStateCurrentVertexLayout = null;
|
||||
sStatePendingVertexLayout = null;
|
||||
sVertexAttribEnables.Clear();
|
||||
_sVertexAttribEnables.Clear();
|
||||
sActiveTexture = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -147,8 +147,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private class BufferPool : IDisposable
|
||||
{
|
||||
private Stack<BufferPoolItem> _availableItems = new Stack<BufferPoolItem>();
|
||||
private Queue<BufferPoolItem> _obtainedItems = new Queue<BufferPoolItem>();
|
||||
private readonly Stack<BufferPoolItem> _availableItems = new Stack<BufferPoolItem>();
|
||||
private readonly Queue<BufferPoolItem> _obtainedItems = new Queue<BufferPoolItem>();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class FileExtensionPreferencesPicker : UserControl
|
||||
{
|
||||
private IDictionary<string, string> _preferredPlatformsForExtensions;
|
||||
private readonly IDictionary<string, string> _preferredPlatformsForExtensions;
|
||||
|
||||
public FileExtensionPreferencesPicker(IDictionary<string, string> preferredPlatformsForExtensions)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
CustomResItemName
|
||||
};
|
||||
|
||||
private bool _programmaticallyChangingPluginComboBox = false;
|
||||
private readonly bool _programmaticallyChangingPluginComboBox = false;
|
||||
|
||||
public N64VideoPluginConfig(
|
||||
IMainFormForConfig mainForm,
|
||||
|
|
|
@ -57,8 +57,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
return File.Exists(exePath);
|
||||
}
|
||||
|
||||
private string SublimeLuaPath = @"Sublime Text 2\Packages\Lua";
|
||||
private string SublimeCompletionsFilename = "bizhawk.lua.sublime-completions";
|
||||
private readonly string SublimeLuaPath = @"Sublime Text 2\Packages\Lua";
|
||||
private readonly string SublimeCompletionsFilename = "bizhawk.lua.sublime-completions";
|
||||
|
||||
private bool IsBizLuaSublimeInstalled()
|
||||
{
|
||||
|
@ -66,8 +66,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
return File.Exists(bizCompletions);
|
||||
}
|
||||
|
||||
private string NotepadPath = "TODO";
|
||||
private string NotepadAutoCompleteFileName = "TODO";
|
||||
private readonly string NotepadPath = "TODO";
|
||||
private readonly string NotepadAutoCompleteFileName = "TODO";
|
||||
|
||||
private bool IsBizLuaNotepadInstalled()
|
||||
{
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private SNESGraphicsDecoder gd;
|
||||
private SNESGraphicsDecoder.ScreenInfo si;
|
||||
private SNESGraphicsDecoder.TileEntry[] map;
|
||||
private byte[,] spriteMap = new byte[256, 224];
|
||||
private readonly byte[,] spriteMap = new byte[256, 224];
|
||||
private SNESGraphicsDecoder.BGMode viewBgMode;
|
||||
|
||||
private void RegenerateData()
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private StreamWriter _streamWriter;
|
||||
private bool _splitFile;
|
||||
private string _baseName;
|
||||
private string _extension = ".log";
|
||||
private readonly string _extension = ".log";
|
||||
private int _segmentCount;
|
||||
private ulong _currentSize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue