mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
[Refs #87: Static Analysis] Remove unused variables
This commit is contained in:
@@ -187,16 +187,11 @@ namespace renderdocui.Code
|
||||
if(renderer != null)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Renderer created");
|
||||
|
||||
DateTime prevTime = DateTime.Now;
|
||||
|
||||
|
||||
Running = true;
|
||||
|
||||
while (Running)
|
||||
{
|
||||
DateTime curTime = DateTime.Now;
|
||||
long msPassed = (curTime.Ticks - prevTime.Ticks) / TimeSpan.TicksPerMillisecond;
|
||||
|
||||
List<InvokeHandle> queue = new List<InvokeHandle>();
|
||||
lock (m_renderQueue)
|
||||
{
|
||||
|
||||
@@ -430,7 +430,6 @@ namespace renderdoc
|
||||
{
|
||||
FieldInfo field = fields[fieldIdx];
|
||||
|
||||
string name = field.Name;
|
||||
IntPtr fieldPtr = isUnion ? sourcePtr : OffsetPtr(structureType, fields, fieldIdx, sourcePtr);
|
||||
|
||||
var arrayType = NonArrayType(field.FieldType);
|
||||
|
||||
@@ -85,8 +85,6 @@ namespace renderdocplugin
|
||||
|
||||
var ass = m_LoadedPlugins[assemblyName];
|
||||
|
||||
Type pluginType = ass.GetType(assemblyName + "." + type.Name);
|
||||
|
||||
return (T)ass.CreateInstance(assemblyName + "." + type.Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,8 +136,6 @@ namespace renderdocui.Windows
|
||||
return;
|
||||
}
|
||||
|
||||
String[] filteredCalls = new String[calls.Length];
|
||||
|
||||
/*
|
||||
String commonRoot = calls[0];
|
||||
|
||||
|
||||
@@ -1131,7 +1131,6 @@ namespace renderdocui.Windows
|
||||
var state = GetUIState(type);
|
||||
|
||||
Input input = state.m_Input;
|
||||
uint instance = m_CurInst;
|
||||
|
||||
if(data.Buffers == null)
|
||||
return;
|
||||
@@ -2220,8 +2219,6 @@ namespace renderdocui.Windows
|
||||
|
||||
private void ShowFormatSpecifier()
|
||||
{
|
||||
UIState ui = GetUIState(MeshDataStage.VSIn);
|
||||
|
||||
if (m_FormatSpecifier == null)
|
||||
{
|
||||
m_FormatSpecifier = new BufferFormatSpecifier(this, m_FormatText);
|
||||
|
||||
@@ -99,11 +99,7 @@ namespace renderdocui.Windows
|
||||
messages.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells;
|
||||
|
||||
for (UInt32 f = 0; f < m_Core.FrameInfo.Length; f++)
|
||||
{
|
||||
FetchDrawcall[] drawcalls = m_Core.GetDrawcalls(f);
|
||||
|
||||
AddDebugMessages(m_Core.GetDrawcalls(f));
|
||||
}
|
||||
|
||||
messages.RowCount = m_Messages.Count;
|
||||
}
|
||||
|
||||
@@ -244,8 +244,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
try
|
||||
{
|
||||
var p = Process.GetProcessById((int)m_Connection.NewChild.PID);
|
||||
|
||||
ChildProcess c = new ChildProcess();
|
||||
c.PID = (int)m_Connection.NewChild.PID;
|
||||
c.ident = m_Connection.NewChild.ident;
|
||||
@@ -713,7 +711,7 @@ namespace renderdocui.Windows
|
||||
try
|
||||
{
|
||||
// if this throws an exception the process no longer exists so we'll remove it
|
||||
var p = Process.GetProcessById(m_Children[i].PID);
|
||||
Process.GetProcessById(m_Children[i].PID);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace renderdocui.Windows.Dialogs
|
||||
// GPU in it to check for bugs or access different hardware profiling counters
|
||||
public partial class ReplayHostManager : Form
|
||||
{
|
||||
MainWindow m_Main;
|
||||
Core m_Core;
|
||||
List<ComboBox> m_Hosts = new List<ComboBox>();
|
||||
|
||||
@@ -56,7 +55,6 @@ namespace renderdocui.Windows.Dialogs
|
||||
Icon = global::renderdocui.Properties.Resources.icon;
|
||||
|
||||
m_Core = core;
|
||||
m_Main = main;
|
||||
|
||||
string[] proxies = new string[0];
|
||||
try
|
||||
|
||||
@@ -462,7 +462,7 @@ namespace renderdocui.Windows
|
||||
string name = s.varName.Length == 0 ? s.semanticName : String.Format("{0} ({1})", s.varName, s.semanticName);
|
||||
if (s.semanticName.Length == 0) name = s.varName;
|
||||
|
||||
var node = inSig.Nodes.Add(new object[] { name, s.semanticIndex, s.regIndex, s.TypeString, s.systemValue.ToString(),
|
||||
inSig.Nodes.Add(new object[] { name, s.semanticIndex, s.regIndex, s.TypeString, s.systemValue.ToString(),
|
||||
SigParameter.GetComponentString(s.regChannelMask), SigParameter.GetComponentString(s.channelUsedMask) });
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace renderdocui.Windows
|
||||
if(multipleStreams)
|
||||
name = String.Format("Stream {0} : {1}", s.stream, name);
|
||||
|
||||
var node = outSig.Nodes.Add(new object[] { name, s.semanticIndex, s.regIndex, s.TypeString, s.systemValue.ToString(),
|
||||
outSig.Nodes.Add(new object[] { name, s.semanticIndex, s.regIndex, s.TypeString, s.systemValue.ToString(),
|
||||
SigParameter.GetComponentString(s.regChannelMask), SigParameter.GetComponentString(s.channelUsedMask) });
|
||||
}
|
||||
}
|
||||
@@ -522,8 +522,6 @@ namespace renderdocui.Windows
|
||||
ScintillaNET.Scintilla scintilla1 = new ScintillaNET.Scintilla();
|
||||
((System.ComponentModel.ISupportInitialize)(scintilla1)).BeginInit();
|
||||
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShaderViewer));
|
||||
|
||||
//
|
||||
// scintilla1
|
||||
//
|
||||
|
||||
@@ -2353,8 +2353,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
if (e.Button == MouseButtons.Right && sender is ToolStripButton)
|
||||
{
|
||||
ToolStripButton me = (sender as ToolStripButton);
|
||||
|
||||
bool checkd = false;
|
||||
|
||||
var butts = new ToolStripButton[] { customRed, customGreen, customBlue, customAlpha };
|
||||
@@ -2592,8 +2590,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
if (tabContextMenu.SourceControl == m_PreviewPanel.Pane.TabStripControl)
|
||||
{
|
||||
int idx = m_PreviewPanel.Pane.TabStripControl.Tabs.IndexOf(m_PreviewPanel.Pane.ActiveContent);
|
||||
|
||||
if (m_PreviewPanel.Pane.ActiveContent != m_PreviewPanel)
|
||||
{
|
||||
(m_PreviewPanel.Pane.ActiveContent as DockContent).Close();
|
||||
@@ -2887,10 +2883,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && sender is ResourcePreview)
|
||||
{
|
||||
var prev = (ResourcePreview)sender;
|
||||
|
||||
var follow = (Following)prev.Tag;
|
||||
|
||||
var id = m_Following.GetResourceId(m_Core);
|
||||
|
||||
if (id != ResourceId.Null)
|
||||
|
||||
@@ -133,8 +133,6 @@ namespace renderdocui.Windows
|
||||
private float DrawPip(Graphics g, Color col, RectangleF rect, int type,
|
||||
int idx, int numChildren, float startSeg, float segWidth, string text)
|
||||
{
|
||||
int pipPaddingX = (int)Math.Max(0, rect.Width * segWidth * 0.02f);
|
||||
|
||||
var subRect = GetSubrect(rect, startSeg, segWidth);
|
||||
subRect.X += pipRadius;
|
||||
subRect.Y += pipPaddingY;
|
||||
|
||||
Reference in New Issue
Block a user