diff --git a/client/application.cpp b/client/application.cpp index 52146f5a..3ea9fb79 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -859,7 +859,7 @@ void application::initialize() auto & facet = std::use_facet(loc); messages_info.language = facet.language(); messages_info.country = facet.country(); - messages_info.encoding ="UTF-8"; + messages_info.encoding = "UTF-8"; #endif spdlog::info("Current locale: language {}, country {}, encoding {}", messages_info.language, messages_info.country, messages_info.encoding); diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index 91e978d3..d5530847 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -307,17 +307,17 @@ void imgui_context::add_chars(std::string_view sv) } #ifdef __ANDROID__ -static std::vector find_font(const ImFontGlyphRangesBuilder& glyph_range_builder, const std::string & locale) +static std::vector find_font(const ImFontGlyphRangesBuilder & glyph_range_builder, const std::string & locale) { std::u16string wtext; std::u16string_view wtextview; - for(int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) + for (int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) { std::uint32_t used_chars = glyph_range_builder.UsedChars[i]; if (used_chars == 0) continue; - for(int j = 0; j < 32; ++j) + for (int j = 0; j < 32; ++j) { ImWchar c = i * 32 + j; if (used_chars & (1 << j)) @@ -357,7 +357,7 @@ static std::vector find_font(const ImFontGlyphRangesBuilder& glyph_ return fonts; } #else -static std::vector find_font(const ImFontGlyphRangesBuilder& glyph_range_builder, const std::string & locale) +static std::vector find_font(const ImFontGlyphRangesBuilder & glyph_range_builder, const std::string & locale) { // See https://www.camconn.cc/post/how-to-fontconfig-lib-c/ @@ -376,13 +376,13 @@ static std::vector find_font(const ImFontGlyphRangesBuilder& glyph_ // Add the text to the pattern (to determine appropriate characters) FcCharSet * charset = FcCharSetCreate(); - for(int i = 8; i < glyph_range_builder.UsedChars.Size; ++i) + for (int i = 8; i < glyph_range_builder.UsedChars.Size; ++i) { std::uint32_t used_chars = glyph_range_builder.UsedChars[i]; if (used_chars == 0) continue; - for(int j = 0; j < 32; ++j) + for (int j = 0; j < 32; ++j) { ImWchar c = i * 32 + j; if (used_chars & (1 << j)) @@ -448,14 +448,14 @@ void imgui_context::initialize_fonts() break; } - for(int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) + for (int i = 0; i < glyph_range_builder.UsedChars.Size; ++i) { std::uint32_t used_chars = glyph_range_builder.UsedChars[i]; if (used_chars == 0) continue; - for(int j = 0; j < 32; ++j) + for (int j = 0; j < 32; ++j) { ImWchar c = i * 32 + j; if (used_chars & (1 << j)) @@ -470,7 +470,7 @@ void imgui_context::initialize_fonts() // Load Fonts auto fonts = find_font(glyph_range_builder, application::get_messages_info().language); - for(auto& i: fonts) + for (auto & i: fonts) { spdlog::info("Font {}", i); } @@ -485,7 +485,7 @@ void imgui_context::initialize_fonts() ImFontConfig config; config.FontDataOwnedByAtlas = false; - for(auto& font: fonts) + for (auto & font: fonts) { spdlog::info("Using font {}", font, application::get_messages_info().language); io.Fonts->AddFontFromFileTTF(font.c_str(), 30, &config, glyph_ranges.Data); @@ -502,7 +502,7 @@ void imgui_context::initialize_fonts() { ImFontConfig config; config.FontDataOwnedByAtlas = false; - for(auto& font: fonts) + for (auto & font: fonts) { large_font = io.Fonts->AddFontFromFileTTF(font.c_str(), 75, &config, glyph_ranges.Data); config.MergeMode = true; diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index efa9f020..65726edf 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -609,7 +609,7 @@ static void ScrollWhenDraggingOnVoid(ImVec2 delta) XrCompositionLayerQuad scenes::lobby::draw_gui(XrTime predicted_display_time) { - for(const auto& [key, server]: application::get_config().servers) + for (const auto & [key, server]: application::get_config().servers) { imgui_ctx->add_chars(server.service.name); }