Merge pull request #7140 from lioncash/move
DolphinQt2/RegisterWidget: std::move std::function instances in AddRegister()
This commit is contained in:
commit
a2bc62dd89
|
@ -4,6 +4,13 @@
|
||||||
|
|
||||||
#include "DolphinQt2/Debugger/RegisterWidget.h"
|
#include "DolphinQt2/Debugger/RegisterWidget.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
#include <QHeaderView>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QTableWidget>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/ProcessorInterface.h"
|
#include "Core/HW/ProcessorInterface.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
@ -11,11 +18,6 @@
|
||||||
#include "DolphinQt2/QtUtils/ActionHelper.h"
|
#include "DolphinQt2/QtUtils/ActionHelper.h"
|
||||||
#include "DolphinQt2/Settings.h"
|
#include "DolphinQt2/Settings.h"
|
||||||
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QTableWidget>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
|
|
||||||
RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)
|
RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Registers"));
|
setWindowTitle(tr("Registers"));
|
||||||
|
@ -335,7 +337,7 @@ void RegisterWidget::PopulateTable()
|
||||||
void RegisterWidget::AddRegister(int row, int column, RegisterType type, std::string register_name,
|
void RegisterWidget::AddRegister(int row, int column, RegisterType type, std::string register_name,
|
||||||
std::function<u64()> get_reg, std::function<void(u64)> set_reg)
|
std::function<u64()> get_reg, std::function<void(u64)> set_reg)
|
||||||
{
|
{
|
||||||
auto* value = new RegisterColumn(type, get_reg, set_reg);
|
auto* value = new RegisterColumn(type, std::move(get_reg), std::move(set_reg));
|
||||||
|
|
||||||
if (m_table->rowCount() <= row)
|
if (m_table->rowCount() <= row)
|
||||||
m_table->setRowCount(row + 1);
|
m_table->setRowCount(row + 1);
|
||||||
|
|
Loading…
Reference in New Issue