mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-14 00:23:50 +00:00
refactor: remaining C-style casts, color constants, and header guard cleanup
Replace ~37 remaining C-style casts with static_cast across 16 files. Extract named color constants (kColorRed/Green/Yellow/Gray) and dialog window flags (kDialogFlags) in game_screen.cpp, replacing 72 inline literals. Normalize keybinding_manager.hpp to #pragma once.
This commit is contained in:
parent
05f2bedf88
commit
ba99d505dd
18 changed files with 120 additions and 114 deletions
|
|
@ -1657,7 +1657,7 @@ VkCommandBuffer VkContext::beginFrame(uint32_t& imageIndex) {
|
|||
return VK_NULL_HANDLE;
|
||||
}
|
||||
if (fenceResult != VK_SUCCESS) {
|
||||
LOG_ERROR("beginFrame[", beginFrameCounter, "] fence wait failed: ", (int)fenceResult);
|
||||
LOG_ERROR("beginFrame[", beginFrameCounter, "] fence wait failed: ", static_cast<int>(fenceResult));
|
||||
if (fenceResult == VK_ERROR_DEVICE_LOST) {
|
||||
deviceLost_ = true;
|
||||
}
|
||||
|
|
@ -1698,7 +1698,7 @@ void VkContext::endFrame(VkCommandBuffer cmd, uint32_t imageIndex) {
|
|||
|
||||
VkResult endResult = vkEndCommandBuffer(cmd);
|
||||
if (endResult != VK_SUCCESS) {
|
||||
LOG_ERROR("endFrame[", endFrameCounter, "] vkEndCommandBuffer FAILED: ", (int)endResult);
|
||||
LOG_ERROR("endFrame[", endFrameCounter, "] vkEndCommandBuffer FAILED: ", static_cast<int>(endResult));
|
||||
}
|
||||
|
||||
auto& frame = frames[currentFrame];
|
||||
|
|
@ -1717,7 +1717,7 @@ void VkContext::endFrame(VkCommandBuffer cmd, uint32_t imageIndex) {
|
|||
|
||||
VkResult submitResult = vkQueueSubmit(graphicsQueue, 1, &submitInfo, frame.inFlightFence);
|
||||
if (submitResult != VK_SUCCESS) {
|
||||
LOG_ERROR("endFrame[", endFrameCounter, "] vkQueueSubmit FAILED: ", (int)submitResult);
|
||||
LOG_ERROR("endFrame[", endFrameCounter, "] vkQueueSubmit FAILED: ", static_cast<int>(submitResult));
|
||||
if (submitResult == VK_ERROR_DEVICE_LOST) {
|
||||
deviceLost_ = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue