Manually tweak source formatting and then re-run clang-format
This commit is contained in:
parent
784b96d87f
commit
396a8d91a4
169 changed files with 805 additions and 809 deletions
|
@ -28,8 +28,7 @@
|
|||
#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team"
|
||||
|
||||
EmuThread::EmuThread(GRenderWindow* render_window)
|
||||
: exec_step(false), running(false), stop_run(false), render_window(render_window) {
|
||||
}
|
||||
: exec_step(false), running(false), stop_run(false), render_window(render_window) {}
|
||||
|
||||
void EmuThread::run() {
|
||||
render_window->MakeCurrent();
|
||||
|
@ -84,8 +83,7 @@ void EmuThread::run() {
|
|||
class GGLWidgetInternal : public QGLWidget {
|
||||
public:
|
||||
GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent)
|
||||
: QGLWidget(fmt, parent), parent(parent) {
|
||||
}
|
||||
: QGLWidget(fmt, parent), parent(parent) {}
|
||||
|
||||
void paintEvent(QPaintEvent* ev) override {
|
||||
if (do_painting) {
|
||||
|
@ -153,8 +151,7 @@ void GRenderWindow::DoneCurrent() {
|
|||
child->doneCurrent();
|
||||
}
|
||||
|
||||
void GRenderWindow::PollEvents() {
|
||||
}
|
||||
void GRenderWindow::PollEvents() {}
|
||||
|
||||
// On Qt 5.0+, this correctly gets the size of the framebuffer (pixels).
|
||||
//
|
||||
|
@ -306,8 +303,8 @@ void GRenderWindow::OnEmulationStopping() {
|
|||
void GRenderWindow::showEvent(QShowEvent* event) {
|
||||
QWidget::showEvent(event);
|
||||
|
||||
// windowHandle() is not initialized until the Window is shown, so we connect it here.
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
// windowHandle() is not initialized until the Window is shown, so we connect it here.
|
||||
connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this,
|
||||
SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection);
|
||||
#endif
|
||||
|
|
|
@ -144,8 +144,8 @@ signals:
|
|||
void Closed();
|
||||
|
||||
private:
|
||||
void
|
||||
OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) override;
|
||||
void OnMinimalClientAreaChangeRequest(
|
||||
const std::pair<unsigned, unsigned>& minimal_size) override;
|
||||
|
||||
GGLWidgetInternal* child;
|
||||
|
||||
|
|
|
@ -22,8 +22,7 @@ ConfigureAudio::ConfigureAudio(QWidget* parent)
|
|||
this->setConfiguration();
|
||||
}
|
||||
|
||||
ConfigureAudio::~ConfigureAudio() {
|
||||
}
|
||||
ConfigureAudio::~ConfigureAudio() {}
|
||||
|
||||
void ConfigureAudio::setConfiguration() {
|
||||
int new_sink_index = 0;
|
||||
|
|
|
@ -12,8 +12,7 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co
|
|||
this->setConfiguration();
|
||||
}
|
||||
|
||||
ConfigureDebug::~ConfigureDebug() {
|
||||
}
|
||||
ConfigureDebug::~ConfigureDebug() {}
|
||||
|
||||
void ConfigureDebug::setConfiguration() {
|
||||
ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "citra_qt/config.h"
|
||||
#include "citra_qt/configure_dialog.h"
|
||||
#include "citra_qt/config.h"
|
||||
#include "ui_configure.h"
|
||||
|
||||
#include "core/settings.h"
|
||||
|
@ -13,11 +13,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent) : QDialog(parent), ui(new Ui::
|
|||
this->setConfiguration();
|
||||
}
|
||||
|
||||
ConfigureDialog::~ConfigureDialog() {
|
||||
}
|
||||
ConfigureDialog::~ConfigureDialog() {}
|
||||
|
||||
void ConfigureDialog::setConfiguration() {
|
||||
}
|
||||
void ConfigureDialog::setConfiguration() {}
|
||||
|
||||
void ConfigureDialog::applyConfiguration() {
|
||||
ui->generalTab->applyConfiguration();
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
|
||||
ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureGeneral) {
|
||||
|
||||
ui->setupUi(this);
|
||||
this->setConfiguration();
|
||||
|
||||
ui->toggle_cpu_jit->setEnabled(!System::IsPoweredOn());
|
||||
}
|
||||
|
||||
ConfigureGeneral::~ConfigureGeneral() {
|
||||
}
|
||||
ConfigureGeneral::~ConfigureGeneral() {}
|
||||
|
||||
void ConfigureGeneral::setConfiguration() {
|
||||
ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan);
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureGraphics) {
|
||||
|
||||
ui->setupUi(this);
|
||||
this->setConfiguration();
|
||||
|
||||
ui->toggle_vsync->setEnabled(!System::IsPoweredOn());
|
||||
}
|
||||
|
||||
ConfigureGraphics::~ConfigureGraphics() {
|
||||
}
|
||||
ConfigureGraphics::~ConfigureGraphics() {}
|
||||
|
||||
void ConfigureGraphics::setConfiguration() {
|
||||
ui->toggle_hw_renderer->setChecked(Settings::values.use_hw_renderer);
|
||||
|
|
|
@ -10,34 +10,35 @@
|
|||
|
||||
ConfigureInput::ConfigureInput(QWidget* parent)
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureInput>()) {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
// Initialize mapping of input enum to UI button.
|
||||
input_mapping = {
|
||||
{std::make_pair(Settings::NativeInput::Values::A, ui->buttonA)},
|
||||
{std::make_pair(Settings::NativeInput::Values::B, ui->buttonB)},
|
||||
{std::make_pair(Settings::NativeInput::Values::X, ui->buttonX)},
|
||||
{std::make_pair(Settings::NativeInput::Values::Y, ui->buttonY)},
|
||||
{std::make_pair(Settings::NativeInput::Values::L, ui->buttonL)},
|
||||
{std::make_pair(Settings::NativeInput::Values::R, ui->buttonR)},
|
||||
{std::make_pair(Settings::NativeInput::Values::ZL, ui->buttonZL)},
|
||||
{std::make_pair(Settings::NativeInput::Values::ZR, ui->buttonZR)},
|
||||
{std::make_pair(Settings::NativeInput::Values::START, ui->buttonStart)},
|
||||
{std::make_pair(Settings::NativeInput::Values::SELECT, ui->buttonSelect)},
|
||||
{std::make_pair(Settings::NativeInput::Values::HOME, ui->buttonHome)},
|
||||
{std::make_pair(Settings::NativeInput::Values::DUP, ui->buttonDpadUp)},
|
||||
{std::make_pair(Settings::NativeInput::Values::DDOWN, ui->buttonDpadDown)},
|
||||
{std::make_pair(Settings::NativeInput::Values::DLEFT, ui->buttonDpadLeft)},
|
||||
{std::make_pair(Settings::NativeInput::Values::DRIGHT, ui->buttonDpadRight)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CUP, ui->buttonCStickUp)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CDOWN, ui->buttonCStickDown)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CLEFT, ui->buttonCStickLeft)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CRIGHT, ui->buttonCStickRight)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CIRCLE_UP, ui->buttonCircleUp)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CIRCLE_DOWN, ui->buttonCircleDown)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CIRCLE_LEFT, ui->buttonCircleLeft)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CIRCLE_RIGHT, ui->buttonCircleRight)},
|
||||
{std::make_pair(Settings::NativeInput::Values::CIRCLE_MODIFIER, ui->buttonCircleMod)},
|
||||
{Settings::NativeInput::Values::A, ui->buttonA},
|
||||
{Settings::NativeInput::Values::B, ui->buttonB},
|
||||
{Settings::NativeInput::Values::X, ui->buttonX},
|
||||
{Settings::NativeInput::Values::Y, ui->buttonY},
|
||||
{Settings::NativeInput::Values::L, ui->buttonL},
|
||||
{Settings::NativeInput::Values::R, ui->buttonR},
|
||||
{Settings::NativeInput::Values::ZL, ui->buttonZL},
|
||||
{Settings::NativeInput::Values::ZR, ui->buttonZR},
|
||||
{Settings::NativeInput::Values::START, ui->buttonStart},
|
||||
{Settings::NativeInput::Values::SELECT, ui->buttonSelect},
|
||||
{Settings::NativeInput::Values::HOME, ui->buttonHome},
|
||||
{Settings::NativeInput::Values::DUP, ui->buttonDpadUp},
|
||||
{Settings::NativeInput::Values::DDOWN, ui->buttonDpadDown},
|
||||
{Settings::NativeInput::Values::DLEFT, ui->buttonDpadLeft},
|
||||
{Settings::NativeInput::Values::DRIGHT, ui->buttonDpadRight},
|
||||
{Settings::NativeInput::Values::CUP, ui->buttonCStickUp},
|
||||
{Settings::NativeInput::Values::CDOWN, ui->buttonCStickDown},
|
||||
{Settings::NativeInput::Values::CLEFT, ui->buttonCStickLeft},
|
||||
{Settings::NativeInput::Values::CRIGHT, ui->buttonCStickRight},
|
||||
{Settings::NativeInput::Values::CIRCLE_UP, ui->buttonCircleUp},
|
||||
{Settings::NativeInput::Values::CIRCLE_DOWN, ui->buttonCircleDown},
|
||||
{Settings::NativeInput::Values::CIRCLE_LEFT, ui->buttonCircleLeft},
|
||||
{Settings::NativeInput::Values::CIRCLE_RIGHT, ui->buttonCircleRight},
|
||||
{Settings::NativeInput::Values::CIRCLE_MODIFIER, ui->buttonCircleMod},
|
||||
};
|
||||
|
||||
// Attach handle click method to each button click.
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
#include "core/hle/service/fs/archive.h"
|
||||
#include "core/system.h"
|
||||
|
||||
static const std::array<int, 12> days_in_month = {{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
|
||||
static const std::array<int, 12> days_in_month = {{
|
||||
31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,
|
||||
}};
|
||||
|
||||
ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) {
|
||||
ui->setupUi(this);
|
||||
|
@ -20,8 +22,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
|
|||
this->setConfiguration();
|
||||
}
|
||||
|
||||
ConfigureSystem::~ConfigureSystem() {
|
||||
}
|
||||
ConfigureSystem::~ConfigureSystem() {}
|
||||
|
||||
void ConfigureSystem::setConfiguration() {
|
||||
enabled = !System::IsPoweredOn();
|
||||
|
@ -51,8 +52,8 @@ void ConfigureSystem::setConfiguration() {
|
|||
void ConfigureSystem::ReadSystemSettings() {
|
||||
// set username
|
||||
username = Service::CFG::GetUsername();
|
||||
// ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this
|
||||
// when we move to Qt 5.5
|
||||
// TODO(wwylele): Use this when we move to Qt 5.5
|
||||
// ui->edit_username->setText(QString::fromStdU16String(username));
|
||||
ui->edit_username->setText(
|
||||
QString::fromUtf16(reinterpret_cast<const ushort*>(username.data())));
|
||||
|
||||
|
@ -80,8 +81,8 @@ void ConfigureSystem::applyConfiguration() {
|
|||
bool modified = false;
|
||||
|
||||
// apply username
|
||||
// std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele):
|
||||
// Use this when we move to Qt 5.5
|
||||
// TODO(wwylele): Use this when we move to Qt 5.5
|
||||
// std::u16string new_username = ui->edit_username->text().toStdU16String();
|
||||
std::u16string new_username(
|
||||
reinterpret_cast<const char16_t*>(ui->edit_username->text().utf16()));
|
||||
if (new_username != username) {
|
||||
|
|
|
@ -78,8 +78,7 @@ void CallstackWidget::OnDebugModeEntered() {
|
|||
}
|
||||
}
|
||||
|
||||
void CallstackWidget::OnDebugModeLeft() {
|
||||
}
|
||||
void CallstackWidget::OnDebugModeLeft() {}
|
||||
|
||||
void CallstackWidget::Clear() {
|
||||
for (int row = 0; row < callstack_model->rowCount(); row++) {
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
DisassemblerModel::DisassemblerModel(QObject* parent)
|
||||
: QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0),
|
||||
selection(QModelIndex()) {
|
||||
}
|
||||
selection(QModelIndex()) {}
|
||||
|
||||
int DisassemblerModel::columnCount(const QModelIndex& parent) const {
|
||||
return 3;
|
||||
|
@ -241,8 +240,7 @@ void DisassemblerWidget::OnDebugModeEntered() {
|
|||
model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
}
|
||||
|
||||
void DisassemblerWidget::OnDebugModeLeft() {
|
||||
}
|
||||
void DisassemblerWidget::OnDebugModeLeft() {}
|
||||
|
||||
int DisassemblerWidget::SelectedRow() {
|
||||
QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex();
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_context, QObject* parent)
|
||||
: QAbstractListModel(parent), context_weak(debug_context),
|
||||
at_breakpoint(debug_context->at_breakpoint),
|
||||
active_breakpoint(debug_context->active_breakpoint) {
|
||||
}
|
||||
active_breakpoint(debug_context->active_breakpoint) {}
|
||||
|
||||
int BreakPointModel::columnCount(const QModelIndex& parent) const {
|
||||
return 1;
|
||||
|
@ -42,7 +41,8 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const {
|
|||
{Pica::DebugContext::Event::IncomingDisplayTransfer,
|
||||
tr("Incoming display transfer")},
|
||||
{Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed")},
|
||||
{Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped")}};
|
||||
{Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped")},
|
||||
};
|
||||
|
||||
DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
|
||||
return (map.find(event) != map.end()) ? map.at(event) : QString();
|
||||
|
|
|
@ -51,8 +51,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {
|
||||
}
|
||||
GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {}
|
||||
|
||||
int GPUCommandListModel::rowCount(const QModelIndex& parent) const {
|
||||
return static_cast<int>(pica_trace.writes.size());
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
#include "video_core/utils.h"
|
||||
|
||||
SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_)
|
||||
: QLabel(parent), surface_widget(surface_widget_) {
|
||||
}
|
||||
SurfacePicture::~SurfacePicture() {
|
||||
}
|
||||
: QLabel(parent), surface_widget(surface_widget_) {}
|
||||
SurfacePicture::~SurfacePicture() {}
|
||||
|
||||
void SurfacePicture::mousePressEvent(QMouseEvent* event) {
|
||||
// Only do something while the left mouse button is held down
|
||||
|
@ -707,9 +705,8 @@ unsigned int GraphicsSurfaceWidget::NibblesPerPixel(GraphicsSurfaceWidget::Forma
|
|||
case Format::D16:
|
||||
return 2 * 2;
|
||||
default:
|
||||
UNREACHABLE_MSG("GraphicsSurfaceWidget::BytesPerPixel: this "
|
||||
"should not be reached as this function should "
|
||||
"be given a format which is in "
|
||||
UNREACHABLE_MSG("GraphicsSurfaceWidget::BytesPerPixel: this should not be reached as this "
|
||||
"function should be given a format which is in "
|
||||
"GraphicsSurfaceWidget::Format. Instead got %i",
|
||||
static_cast<int>(format));
|
||||
return 0;
|
||||
|
|
|
@ -29,8 +29,7 @@ using nihstro::SourceRegister;
|
|||
using nihstro::SwizzlePattern;
|
||||
|
||||
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent)
|
||||
: QAbstractTableModel(parent), par(parent) {
|
||||
}
|
||||
: QAbstractTableModel(parent), par(parent) {}
|
||||
|
||||
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
|
||||
return 3;
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
#include "citra_qt/debugger/ramview.h"
|
||||
|
||||
GRamView::GRamView(QWidget* parent) : QHexEdit(parent) {
|
||||
}
|
||||
GRamView::GRamView(QWidget* parent) : QHexEdit(parent) {}
|
||||
|
||||
void GRamView::OnCPUStepped() {
|
||||
// TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams...
|
||||
|
|
|
@ -75,8 +75,7 @@ void RegistersWidget::OnDebugModeEntered() {
|
|||
UpdateVFPSystemRegisterValues();
|
||||
}
|
||||
|
||||
void RegistersWidget::OnDebugModeLeft() {
|
||||
}
|
||||
void RegistersWidget::OnDebugModeLeft() {}
|
||||
|
||||
void RegistersWidget::OnEmulationStarting(EmuThread* emu_thread) {
|
||||
setEnabled(true);
|
||||
|
|
|
@ -59,12 +59,9 @@ static QString GetQStringShortTitleFromSMDH(const Loader::SMDH& smdh,
|
|||
class GameListItem : public QStandardItem {
|
||||
|
||||
public:
|
||||
GameListItem() : QStandardItem() {
|
||||
}
|
||||
GameListItem(const QString& string) : QStandardItem(string) {
|
||||
}
|
||||
virtual ~GameListItem() override {
|
||||
}
|
||||
GameListItem() : QStandardItem() {}
|
||||
GameListItem(const QString& string) : QStandardItem(string) {}
|
||||
virtual ~GameListItem() override {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -79,8 +76,7 @@ public:
|
|||
static const int FullPathRole = Qt::UserRole + 1;
|
||||
static const int TitleRole = Qt::UserRole + 2;
|
||||
|
||||
GameListItemPath() : GameListItem() {
|
||||
}
|
||||
GameListItemPath() : GameListItem() {}
|
||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data) : GameListItem() {
|
||||
setData(game_path, FullPathRole);
|
||||
|
||||
|
@ -124,8 +120,7 @@ class GameListItemSize : public GameListItem {
|
|||
public:
|
||||
static const int SizeRole = Qt::UserRole + 1;
|
||||
|
||||
GameListItemSize() : GameListItem() {
|
||||
}
|
||||
GameListItemSize() : GameListItem() {}
|
||||
GameListItemSize(const qulonglong size_bytes) : GameListItem() {
|
||||
setData(size_bytes, SizeRole);
|
||||
}
|
||||
|
@ -161,8 +156,7 @@ class GameListWorker : public QObject, public QRunnable {
|
|||
|
||||
public:
|
||||
GameListWorker(QString dir_path, bool deep_scan)
|
||||
: QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) {
|
||||
}
|
||||
: QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) {}
|
||||
|
||||
public slots:
|
||||
/// Starts the processing of directory tree information.
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
#include "citra_qt/ui_settings.h"
|
||||
|
||||
struct Hotkey {
|
||||
Hotkey() : shortcut(nullptr), context(Qt::WindowShortcut) {
|
||||
}
|
||||
Hotkey() : shortcut(nullptr), context(Qt::WindowShortcut) {}
|
||||
|
||||
QKeySequence keyseq;
|
||||
QShortcut* shortcut;
|
||||
|
|
|
@ -26,8 +26,8 @@ class GPUCommandListWidget;
|
|||
class GMainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
static const int max_recent_files_item =
|
||||
10; ///< Max number of recently loaded items to keep track
|
||||
/// Max number of recently loaded items to keep track of
|
||||
static const int max_recent_files_item = 10;
|
||||
|
||||
// TODO: Make use of this!
|
||||
enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue