From e858d229a0dfae81f087b63387a8aa186176e82c Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 30 Oct 2015 10:45:16 +0100 Subject: [PATCH] Examples: update all examples with same comment (#389) --- examples/allegro5_example/main.cpp | 2 +- examples/directx11_example/main.cpp | 2 +- examples/directx9_example/main.cpp | 2 +- examples/marmalade_example/main.cpp | 2 +- examples/opengl3_example/main.cpp | 2 +- examples/sdl_opengl_example/main.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp index 314d3a6a1..9d3908530 100644 --- a/examples/allegro5_example/main.cpp +++ b/examples/allegro5_example/main.cpp @@ -35,7 +35,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges); diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp index 7ac1fd1c7..13e60a6c1 100644 --- a/examples/directx11_example/main.cpp +++ b/examples/directx11_example/main.cpp @@ -161,7 +161,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges); diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index 449be683d..2143b8711 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -85,7 +85,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges); diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp index 7f6ad6ba9..e5b059c97 100644 --- a/examples/marmalade_example/main.cpp +++ b/examples/marmalade_example/main.cpp @@ -27,7 +27,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges); diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 38288fe8f..9ab127340 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -41,7 +41,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges); diff --git a/examples/sdl_opengl_example/main.cpp b/examples/sdl_opengl_example/main.cpp index 3499924c1..da837aaab 100644 --- a/examples/sdl_opengl_example/main.cpp +++ b/examples/sdl_opengl_example/main.cpp @@ -40,7 +40,7 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); // Merge glyphs from multiple fonts into one (e.g. combine default font with another with Chinese glyphs, or add icons) - //ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; + //static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // will not be copied by AddFont* so keep in scope. //ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true; //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 18.0f); //io.Fonts->AddFontFromFileTTF("../../extra_fonts/fontawesome-webfont.ttf", 18.0f, &icons_config, icons_ranges);