Skip to content

Commit e083cf5

Browse files
committed
Format code
1 parent b2eec14 commit e083cf5

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

Diff for: imgui.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ class cni_register final {
165165
std::string name;
166166
cs::var func;
167167
template<typename _fT>
168-
cni_register(const char *str, _fT &&func, bool is_const):name(str), func(cs::make_cni(func, is_const)){
168+
cni_register(const char *str, _fT &&func, bool is_const):name(str), func(cs::make_cni(func, is_const))
169+
{
169170
register_list.push_back(this);
170171
}
171172
};
@@ -330,7 +331,7 @@ namespace imgui_cs_ext {
330331
void add_font_default(number size)
331332
{
332333
ImFontConfig font_cfg = ImFontConfig();
333-
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, %.0fpx", (float)size);
334+
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, %.0fpx", (float)size);
334335
ImGui::GetIO().FontDefault = ImGui::GetIO().Fonts->AddFontFromMemoryCompressedBase85TTF(imgui_cs::get_droidsans_ttf_data(), size, &font_cfg);
335336
}
336337

Diff for: imgui_gl2.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace imgui_cs {
6262
ImGui_ImplGlfw_InitForOpenGL(window, true);
6363
ImGui_ImplOpenGL2_Init();
6464
ImFontConfig font_cfg = ImFontConfig();
65-
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, 14px");
65+
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, 14px");
6666
ImGui::GetIO().Fonts->AddFontFromMemoryCompressedBase85TTF(get_droidsans_ttf_data(), 14, &font_cfg);
6767
}
6868

Diff for: imgui_gl3.hpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ namespace imgui_cs {
3737
if (!glfwInit())
3838
throw cs::lang_error("Init OpenGL Error.");
3939
#if __APPLE__
40-
// GL 3.2
41-
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
42-
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
43-
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
44-
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
40+
// GL 3.2
41+
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
42+
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
43+
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
44+
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
4545
#else
46-
// GL 3.0
47-
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
48-
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
46+
// GL 3.0
47+
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
48+
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
4949
#endif
5050
}
5151

@@ -66,11 +66,11 @@ namespace imgui_cs {
6666
void init()
6767
{
6868
#if __APPLE__
69-
// GLSL 150
70-
const char* glsl_version = "#version 150";
69+
// GLSL 150
70+
const char* glsl_version = "#version 150";
7171
#else
72-
// GLSL 130
73-
const char* glsl_version = "#version 130";
72+
// GLSL 130
73+
const char* glsl_version = "#version 130";
7474
#endif
7575
glfwMakeContextCurrent(window);
7676
glfwSwapInterval(1);
@@ -80,7 +80,7 @@ namespace imgui_cs {
8080
ImGui_ImplGlfw_InitForOpenGL(window, true);
8181
ImGui_ImplOpenGL3_Init(glsl_version);
8282
ImFontConfig font_cfg = ImFontConfig();
83-
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, 14px");
83+
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "DefaultFont, 14px");
8484
ImGui::GetIO().Fonts->AddFontFromMemoryCompressedBase85TTF(get_droidsans_ttf_data(), 14, &font_cfg);
8585
}
8686

Diff for: src/droidsans_ttf.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,8 @@ static const char droidsans_ttf_compressed_data_base85[167935+1] =
12031203
"pL;8$IH4I#xh'+$wXM8$QaXI#(+L+$'f`8$`G_J#uBwntj2#&#S@wntW:$##(PUV$$t#p@4####";
12041204

12051205
namespace imgui_cs {
1206-
const char *get_droidsans_ttf_data()
1207-
{
1208-
return droidsans_ttf_compressed_data_base85;
1209-
}
1206+
const char *get_droidsans_ttf_data()
1207+
{
1208+
return droidsans_ttf_compressed_data_base85;
1209+
}
12101210
}

0 commit comments

Comments
 (0)