Skip to content

Commit 70ff419

Browse files
committed
applied clang format
1 parent a2a1416 commit 70ff419

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

rizin

Submodule rizin updated 164 files

src/widgets/DecompilerWidget.cpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ void DecompilerWidget::showVariableTooltip(QHelpEvent *event, RzCodeAnnotation *
537537
} else {
538538
// TODO: track the value of the synthetic/untracked variables and show it in the tooltip.
539539
tooltipContent = QString("<b>%1</b><br><i>(Synthetic/Untracked Variable)</i>")
540-
.arg(QString::fromUtf8(annotation->variable.name));
540+
.arg(QString::fromUtf8(annotation->variable.name));
541541
}
542542
QToolTip::showText(event->globalPos(), tooltipContent, ui->textEdit);
543543
}
@@ -563,15 +563,19 @@ QString DecompilerWidget::formatVarValue(RzAnalysisVar *var)
563563
if (stackAddr != 0) {
564564
ut64 pointedAddr = 0;
565565
int ptrSize = core->analysis->bits / 8;
566-
int pointedAddr_state = rz_io_read_at_mapped(core->io, stackAddr, (ut8*)&pointedAddr, ptrSize);
566+
int pointedAddr_state =
567+
rz_io_read_at_mapped(core->io, stackAddr, (ut8 *)&pointedAddr, ptrSize);
567568
if (pointedAddr_state > 0 && pointedAddr != 0) {
568569
ut8 buf[256];
569-
int str_state = rz_io_read_at_mapped(core->io, pointedAddr, buf, sizeof(buf) - 1);
570+
int str_state =
571+
rz_io_read_at_mapped(core->io, pointedAddr, buf, sizeof(buf) - 1);
570572
if (str_state != 0) {
571-
buf[sizeof(buf)-1] = 0;
573+
buf[sizeof(buf) - 1] = 0;
572574
if (isprint(buf[0]) || buf[0] == '\0') {
573-
displayValue += QString("<br><font color='#f1c40f'>value: \"%1\"</font>")
574-
.arg(QString::fromUtf8(reinterpret_cast<const char*>(buf)));
575+
displayValue +=
576+
QString("<br><font color='#f1c40f'>value: \"%1\"</font>")
577+
.arg(QString::fromUtf8(
578+
reinterpret_cast<const char *>(buf)));
575579
}
576580
}
577581
}
@@ -580,23 +584,23 @@ QString DecompilerWidget::formatVarValue(RzAnalysisVar *var)
580584
}
581585
rz_mem_free(rawVal);
582586
return QString("<b>%1</b> (%2)<br>Value: %3")
583-
.arg(QString::fromUtf8(var->name), typeStr, displayValue);
587+
.arg(QString::fromUtf8(var->name), typeStr, displayValue);
584588
}
585589

586590
bool DecompilerWidget::eventFilter(QObject *obj, QEvent *event)
587591
{
588-
if (event->type() == QEvent::ToolTip &&
589-
Config()->getShowVarTooltips() &&
590-
(obj == ui->textEdit || obj == ui->textEdit->viewport())) {
592+
if (event->type() == QEvent::ToolTip && Config()->getShowVarTooltips()
593+
&& (obj == ui->textEdit || obj == ui->textEdit->viewport())) {
591594
QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
592595
QTextCursor cursor = ui->textEdit->cursorForPosition(helpEvent->pos());
593596
size_t pos = cursor.position();
594597
void *iter;
595-
rz_vector_foreach(&this->code->annotations, iter) {
598+
rz_vector_foreach(&this->code->annotations, iter)
599+
{
596600
RzCodeAnnotation *annotation = (RzCodeAnnotation *)iter;
597601
if (pos >= annotation->start && pos < annotation->end) {
598-
if (annotation->type == RZ_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE ||
599-
annotation->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER) {
602+
if (annotation->type == RZ_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE
603+
|| annotation->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER) {
600604
showVariableTooltip(helpEvent, annotation);
601605
return true;
602606
}

src/widgets/DecompilerWidget.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ private slots:
258258

259259
void showVariableTooltip(QHelpEvent *event, RzCodeAnnotation *annotation);
260260
QString formatVarValue(RzAnalysisVar *var);
261-
262261
};
263262

264263
#endif // DECOMPILERWIDGET_H

0 commit comments

Comments
 (0)