mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Fix unused variables
In almost all cases these can be removed. The only exception is in ShaderViewer.cpp, where regIdx should have been used.
This commit is contained in:
committed by
Baldur Karlsson
parent
b227229d9f
commit
58b628ee8b
@@ -86,8 +86,6 @@ CaptureContext::CaptureContext(QString paramFilename, QString remoteHost, uint32
|
||||
|
||||
if(!paramFilename.isEmpty())
|
||||
{
|
||||
QFileInfo fi(paramFilename);
|
||||
|
||||
m_MainWindow->LoadFromFilename(paramFilename, temp);
|
||||
if(temp)
|
||||
m_MainWindow->takeCaptureOwnership();
|
||||
|
||||
@@ -461,8 +461,6 @@ ResourceId CommonPipelineState::GetShader(ShaderStage stage)
|
||||
|
||||
QString CommonPipelineState::GetShaderName(ShaderStage stage)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
if(IsCaptureLoaded())
|
||||
{
|
||||
if(IsCaptureD3D11())
|
||||
|
||||
@@ -410,10 +410,6 @@ PythonContext::PythonContext(QObject *parent) : QObject(parent)
|
||||
// clone our own local context
|
||||
context_namespace = PyDict_Copy(main_dict);
|
||||
|
||||
QString typeStr;
|
||||
QString valueStr;
|
||||
QList<QString> frames;
|
||||
|
||||
// for compatibility with earlier versions of python that took a char * instead of const char *
|
||||
char noparams[1] = "";
|
||||
|
||||
@@ -873,4 +869,4 @@ extern "C" void SetThreadBlocking(PyObject *global_handle, bool block)
|
||||
OutputRedirector *redirector = (OutputRedirector *)global_handle;
|
||||
if(redirector && redirector->context)
|
||||
return redirector->context->setThreadBlocking(block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -835,7 +835,6 @@ void RDHeaderView::paintSection(QPainter *painter, const QRect &rect, int sectio
|
||||
else
|
||||
opt.state &= ~(QStyle::State_Active | QStyle::State_HasFocus);
|
||||
|
||||
QVariant textAlignment = m->headerData(section, orientation(), Qt::TextAlignmentRole);
|
||||
opt.rect = rect;
|
||||
opt.section = section;
|
||||
opt.textAlignment = defaultAlignment();
|
||||
|
||||
@@ -2264,8 +2264,6 @@ void BufferViewer::configureMeshColumns()
|
||||
else
|
||||
m_ModelVSIn->numRows = draw->numIndices;
|
||||
|
||||
QVector<BoundVBuffer> vbs = m_Ctx.CurPipelineState().GetVBuffers();
|
||||
|
||||
Viewport vp = m_Ctx.CurPipelineState().GetViewport(0);
|
||||
|
||||
m_Config.fov = ui->fovGuess->value();
|
||||
|
||||
@@ -529,7 +529,6 @@ void TextureSaveDialog::on_browse_clicked()
|
||||
QString filename =
|
||||
RDDialog::getSaveFileName(this, tr("Save Texture As"), QString(), filter, selectedFilter);
|
||||
|
||||
QFileInfo checkFile(filename);
|
||||
if(!filename.isEmpty())
|
||||
{
|
||||
ui->filename->setText(filename);
|
||||
|
||||
@@ -1723,7 +1723,6 @@ void MainWindow::on_action_Settings_triggered()
|
||||
void MainWindow::on_action_View_Documentation_triggered()
|
||||
{
|
||||
QFileInfo fi(QGuiApplication::applicationFilePath());
|
||||
QDir curDir = QFileInfo(QGuiApplication::applicationFilePath()).absoluteDir();
|
||||
|
||||
if(fi.absoluteDir().exists(lit("renderdoc.chm")))
|
||||
QDesktopServices::openUrl(
|
||||
|
||||
@@ -515,7 +515,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
s.systemValue == ShaderBuiltin::Undefined ? QString::number(s.regIndex) : lit("-");
|
||||
|
||||
ui->inputSig->addTopLevelItem(new RDTreeWidgetItem(
|
||||
{name, semIdx, QString::number(s.regIndex), TypeString(s), ToQStr(s.systemValue),
|
||||
{name, semIdx, regIdx, TypeString(s), ToQStr(s.systemValue),
|
||||
GetComponentString(s.regChannelMask), GetComponentString(s.channelUsedMask)}));
|
||||
}
|
||||
|
||||
|
||||
@@ -858,7 +858,6 @@ void TimelineBar::paintMarkers(QPainter &p, const QVector<Marker> &markers,
|
||||
if(elided == tooshort)
|
||||
elided = QString();
|
||||
|
||||
QRectF textRect = r;
|
||||
r.setLeft(qRound(r.left() + margin));
|
||||
|
||||
p.drawText(r, elided, to);
|
||||
|
||||
Reference in New Issue
Block a user