Clang fixes.

This commit is contained in:
Ben Vanik
2015-07-19 18:32:48 -07:00
parent baa86fcd1b
commit 12a29371e3
25 changed files with 111 additions and 95 deletions

View File

@@ -81,10 +81,10 @@ class CDialogEventHandler : public IFileDialogEvents,
return S_OK;
};
CDialogEventHandler() : _cRef(1){};
CDialogEventHandler() : _cRef(1) {}
private:
~CDialogEventHandler(){};
virtual ~CDialogEventHandler() = default;
long _cRef;
};

View File

@@ -74,7 +74,7 @@ class GL4ElementalRenderer : public el::graphics::Renderer {
GLenum prim_type;
size_t vertex_offset;
size_t vertex_count;
} draw_commands_[kMaxCommands] = {0};
} draw_commands_[kMaxCommands] = {{0}};
uint32_t draw_command_count_ = 0;
GL4Bitmap* current_bitmap_ = nullptr;
Vertex vertices_[kMaxVertexBatchSize];

View File

@@ -72,7 +72,7 @@ class GLProfilerDisplay : public ProfilerDisplay {
struct {
uint16_t char_offsets[256];
} font_description_ = {0};
} font_description_ = {{0}};
};
} // namespace gl

View File

@@ -121,6 +121,7 @@ bool Window::InitializeElemental(Loop* loop, el::graphics::Renderer* renderer) {
// Create the font now.
auto font =
font_manager->CreateFontFace(font_manager->default_font_description());
assert(font != nullptr);
return true;
}

View File

@@ -521,6 +521,9 @@ Win32MenuItem::Win32MenuItem(Type type, const std::wstring& text,
case MenuItem::Type::kPopup:
handle_ = CreatePopupMenu();
break;
default:
// May just be a placeholder.
break;
}
if (handle_) {
MENUINFO menu_info = {0};
@@ -542,6 +545,9 @@ void Win32MenuItem::OnChildAdded(MenuItem* generic_child_item) {
auto child_item = static_cast<Win32MenuItem*>(generic_child_item);
switch (child_item->type()) {
case MenuItem::Type::kNormal:
// Nothing special.
break;
case MenuItem::Type::kPopup:
AppendMenuW(handle_, MF_POPUP,
reinterpret_cast<UINT_PTR>(child_item->handle()),
@@ -561,10 +567,7 @@ void Win32MenuItem::OnChildAdded(MenuItem* generic_child_item) {
}
}
void Win32MenuItem::OnChildRemoved(MenuItem* generic_child_item) {
auto child_item = static_cast<Win32MenuItem*>(generic_child_item);
//
}
void Win32MenuItem::OnChildRemoved(MenuItem* generic_child_item) {}
} // namespace ui
} // namespace xe

View File

@@ -64,7 +64,6 @@ class Win32Window : public Window {
bool HandleKeyboard(UINT message, WPARAM wParam, LPARAM lParam);
HWND hwnd_ = nullptr;
bool invalidated_ = true;
bool closing_ = false;
WINDOWPLACEMENT windowed_pos_;