Skip to content

Commit 474208c

Browse files
committed
clang format
1 parent 17d9981 commit 474208c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/window/gui/Gui.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ void Gui::Init(GuiWindowInitData windowImpl) {
152152
GetGameOverlay()->Init();
153153

154154
Context::GetInstance()->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(
155-
std::make_shared<ResourceFactoryBinaryGuiTextureV0>(), RESOURCE_FORMAT_BINARY, "GuiTexture",
156-
static_cast<uint32_t>(RESOURCE_TYPE_GUI_TEXTURE), 0);
155+
std::make_shared<ResourceFactoryBinaryGuiTextureV0>(), RESOURCE_FORMAT_BINARY, "GuiTexture",
156+
static_cast<uint32_t>(RESOURCE_TYPE_GUI_TEXTURE), 0);
157157

158158
ImGuiWMInit();
159159
ImGuiBackendInit();
@@ -239,7 +239,8 @@ void Gui::LoadTextureFromRawImage(const std::string& name, const std::string& pa
239239
initData->Format = RESOURCE_FORMAT_BINARY;
240240
initData->Type = static_cast<uint32_t>(RESOURCE_TYPE_GUI_TEXTURE);
241241
initData->ResourceVersion = 0;
242-
auto guiTexture = std::static_pointer_cast<GuiTexture>(Context::GetInstance()->GetResourceManager()->LoadResource(path, false, initData));
242+
auto guiTexture = std::static_pointer_cast<GuiTexture>(
243+
Context::GetInstance()->GetResourceManager()->LoadResource(path, false, initData));
243244

244245
GfxRenderingAPI* api = gfx_get_current_rendering_api();
245246

src/window/gui/resource/GuiTexture.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <stb/stb_image.h>
55

66
namespace LUS {
7-
#define RESOURCE_TYPE_GUI_TEXTURE 0x47544558 //GTEX
7+
#define RESOURCE_TYPE_GUI_TEXTURE 0x47544558 // GTEX
88

99
struct GuiTextureMetadata {
1010
uint32_t RendererTextureId;

src/window/gui/resource/GuiTextureFactory.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ std::shared_ptr<IResource> ResourceFactoryBinaryGuiTextureV0::ReadResource(std::
1414
guiTexture->DataSize = file->Buffer->size();
1515
guiTexture->Metadata.Width = 0;
1616
guiTexture->Metadata.Height = 0;
17-
guiTexture->Data = stbi_load_from_memory(reinterpret_cast<const stbi_uc*>(file->Buffer->data()), guiTexture->DataSize,
18-
&guiTexture->Metadata.Width, &guiTexture->Metadata.Height, nullptr, 4);
17+
guiTexture->Data =
18+
stbi_load_from_memory(reinterpret_cast<const stbi_uc*>(file->Buffer->data()), guiTexture->DataSize,
19+
&guiTexture->Metadata.Width, &guiTexture->Metadata.Height, nullptr, 4);
1920

2021
if (guiTexture->Data == nullptr) {
2122
SPDLOG_ERROR("Error loading imgui texture {}", stbi_failure_reason());

0 commit comments

Comments
 (0)