More style.

This commit is contained in:
Ben Vanik
2015-08-07 21:29:03 -07:00
parent 14beb27ebc
commit a92566dfc5
131 changed files with 1141 additions and 1056 deletions

View File

@@ -42,9 +42,9 @@ bool MainWindow::Initialize() {
window_->on_closed.AddListener(std::bind(&MainWindow::OnClose, this));
window_->on_key_down.AddListener([this](xe::ui::KeyEvent& e) {
window_->on_key_down.AddListener([this](xe::ui::KeyEvent* e) {
bool handled = true;
switch (e.key_code()) {
switch (e->key_code()) {
case 0x1B: { // VK_ESCAPE
// Allow users to escape fullscreen (but not enter it).
if (window_->is_fullscreen()) {
@@ -58,7 +58,7 @@ bool MainWindow::Initialize() {
default: { handled = false; } break;
}
e.set_handled(handled);
e->set_handled(handled);
});
// Main menu.
@@ -93,7 +93,7 @@ bool MainWindow::Initialize() {
}
void MainWindow::BuildUI() {
using namespace el::dsl;
using namespace el::dsl; // NOLINT(build/namespaces)
el::AnimationBlocker animation_blocker;
auto root_element = window_->root_element();

View File

@@ -24,7 +24,7 @@ namespace ui {
class MainWindow {
public:
MainWindow(Application* app);
explicit MainWindow(Application* app);
~MainWindow();
Application* app() const { return app_; }

View File

@@ -24,7 +24,7 @@ class System;
class Module {
public:
Module(System* system) : system_(system) {}
explicit Module(System* system) : system_(system) {}
bool is_dead() const { return is_dead_; }
void set_dead(bool is_dead) { is_dead_ = is_dead; }

View File

@@ -16,7 +16,7 @@ namespace debug {
namespace ui {
namespace model {
using namespace xe::debug::proto;
using namespace xe::debug::proto; // NOLINT(build/namespaces)
System::System(xe::ui::Loop* loop, DebugClient* client)
: loop_(loop), client_(client) {

View File

@@ -36,7 +36,7 @@ class View {
virtual void Setup(xe::debug::DebugClient* client) = 0;
protected:
View(std::string name) : name_(name) {}
explicit View(std::string name) : name_(name) {}
std::string name_;
el::LayoutBox root_element_;

View File

@@ -22,7 +22,7 @@ CpuView::CpuView() : View("CPU") {}
CpuView::~CpuView() = default;
el::Element* CpuView::BuildUI() {
using namespace el::dsl;
using namespace el::dsl; // NOLINT(build/namespaces)
el::AnimationBlocker animation_blocker;
auto functions_node =
@@ -197,7 +197,7 @@ void CpuView::UpdateModuleList() {
module_items->push_back(std::move(item));
}
if (is_first) {
module_dropdown->set_value(int(module_items->size() - 1));
module_dropdown->set_value(static_cast<int>(module_items->size() - 1));
}
}
@@ -237,7 +237,7 @@ void CpuView::UpdateThreadList() {
thread_items->push_back(std::move(item));
}
if (is_first) {
thread_dropdown->set_value(int(thread_items->size() - 1));
thread_dropdown->set_value(static_cast<int>(thread_items->size() - 1));
}
}

View File

@@ -21,7 +21,7 @@ GpuView::GpuView() : View("GPU") {}
GpuView::~GpuView() = default;
el::Element* GpuView::BuildUI() {
using namespace el::dsl;
using namespace el::dsl; // NOLINT(build/namespaces)
el::AnimationBlocker animation_blocker;
auto node = LabelNode("TODO");