From 6a25a8720ac27573225643a1188d8a49b4ad614e Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 29 Jan 2018 14:38:46 +0100 Subject: [PATCH] Examples: Using #include "imgui.h" instead of appear correct-er as per standard? xcode+clang are very nitpicky there. --- examples/allegro5_example/imgui_impl_a5.cpp | 2 +- examples/allegro5_example/main.cpp | 2 +- examples/directx10_example/main.cpp | 2 +- examples/directx11_example/imgui_impl_dx11.cpp | 2 +- examples/directx11_example/main.cpp | 2 +- examples/directx9_example/imgui_impl_dx9.cpp | 2 +- examples/directx9_example/main.cpp | 2 +- examples/marmalade_example/imgui_impl_marmalade.cpp | 2 +- examples/marmalade_example/main.cpp | 2 +- examples/null_example/main.cpp | 2 +- examples/opengl2_example/imgui_impl_glfw_gl2.cpp | 2 +- examples/opengl2_example/main.cpp | 2 +- examples/opengl3_example/imgui_impl_glfw_gl3.cpp | 2 +- examples/opengl3_example/main.cpp | 2 +- examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp | 2 +- examples/sdl_opengl2_example/main.cpp | 2 +- examples/sdl_opengl3_example/main.cpp | 2 +- examples/vulkan_example/imgui_impl_glfw_vulkan.cpp | 5 ++--- examples/vulkan_example/main.cpp | 5 ++--- 19 files changed, 21 insertions(+), 23 deletions(-) diff --git a/examples/allegro5_example/imgui_impl_a5.cpp b/examples/allegro5_example/imgui_impl_a5.cpp index 62f7af67..42691362 100644 --- a/examples/allegro5_example/imgui_impl_a5.cpp +++ b/examples/allegro5_example/imgui_impl_a5.cpp @@ -12,7 +12,7 @@ #include // uint64_t #include // memcpy -#include +#include "imgui.h" #include "imgui_impl_a5.h" #include #include diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp index 3c9c9770..7ecf4321 100644 --- a/examples/allegro5_example/main.cpp +++ b/examples/allegro5_example/main.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include "imgui.h" #include "imgui_impl_a5.h" int main(int, char**) diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp index 38f4054e..fccdda60 100644 --- a/examples/directx10_example/main.cpp +++ b/examples/directx10_example/main.cpp @@ -1,7 +1,7 @@ // ImGui - standalone example application for DirectX 10 // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. -#include +#include "imgui.h" #include "imgui_impl_dx10.h" #include #include diff --git a/examples/directx11_example/imgui_impl_dx11.cpp b/examples/directx11_example/imgui_impl_dx11.cpp index 4963fc12..25742cb7 100644 --- a/examples/directx11_example/imgui_impl_dx11.cpp +++ b/examples/directx11_example/imgui_impl_dx11.cpp @@ -6,7 +6,7 @@ // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // https://github.com/ocornut/imgui -#include +#include "imgui.h" #include "imgui_impl_dx11.h" // DirectX diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp index 79e7bb16..f1e3b8ac 100644 --- a/examples/directx11_example/main.cpp +++ b/examples/directx11_example/main.cpp @@ -1,7 +1,7 @@ // ImGui - standalone example application for DirectX 11 // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. -#include +#include "imgui.h" #include "imgui_impl_dx11.h" #include #define DIRECTINPUT_VERSION 0x0800 diff --git a/examples/directx9_example/imgui_impl_dx9.cpp b/examples/directx9_example/imgui_impl_dx9.cpp index a4e67691..b47a840b 100644 --- a/examples/directx9_example/imgui_impl_dx9.cpp +++ b/examples/directx9_example/imgui_impl_dx9.cpp @@ -6,7 +6,7 @@ // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // https://github.com/ocornut/imgui -#include +#include "imgui.h" #include "imgui_impl_dx9.h" // DirectX diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index 09a109d9..d0323dca 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -1,7 +1,7 @@ // ImGui - standalone example application for DirectX 9 // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. -#include +#include "imgui.h" #include "imgui_impl_dx9.h" #include #define DIRECTINPUT_VERSION 0x0800 diff --git a/examples/marmalade_example/imgui_impl_marmalade.cpp b/examples/marmalade_example/imgui_impl_marmalade.cpp index 36fc8328..0bffb30d 100644 --- a/examples/marmalade_example/imgui_impl_marmalade.cpp +++ b/examples/marmalade_example/imgui_impl_marmalade.cpp @@ -9,7 +9,7 @@ // Copyright (C) 2015 by Giovanni Zito // This file is part of ImGui -#include +#include "imgui.h" #include "imgui_impl_marmalade.h" #include diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp index 2b5edb77..338c469c 100644 --- a/examples/marmalade_example/main.cpp +++ b/examples/marmalade_example/main.cpp @@ -4,7 +4,7 @@ // Copyright (C) 2015 by Giovanni Zito // This file is part of ImGui -#include +#include "imgui.h" #include "imgui_impl_marmalade.h" #include diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp index 04c1bda4..3dd41b0e 100644 --- a/examples/null_example/main.cpp +++ b/examples/null_example/main.cpp @@ -1,5 +1,5 @@ // ImGui - null/dummy example application (compile and link imgui with no inputs, no outputs) -#include +#include "imgui.h" #include int main(int, char**) diff --git a/examples/opengl2_example/imgui_impl_glfw_gl2.cpp b/examples/opengl2_example/imgui_impl_glfw_gl2.cpp index e5fe2f47..27052b60 100644 --- a/examples/opengl2_example/imgui_impl_glfw_gl2.cpp +++ b/examples/opengl2_example/imgui_impl_glfw_gl2.cpp @@ -15,7 +15,7 @@ // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // https://github.com/ocornut/imgui -#include +#include "imgui.h" #include "imgui_impl_glfw_gl2.h" // GLFW diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp index 6359f5b6..01eba4fb 100644 --- a/examples/opengl2_example/main.cpp +++ b/examples/opengl2_example/main.cpp @@ -6,7 +6,7 @@ // **Prefer using the code in the opengl3_example/ folder** // See imgui_impl_glfw.cpp for details. -#include +#include "imgui.h" #include "imgui_impl_glfw_gl2.h" #include #include diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index a71fc515..f02692b2 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -8,7 +8,7 @@ // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // https://github.com/ocornut/imgui -#include +#include "imgui.h" #include "imgui_impl_glfw_gl3.h" // GL3W/GLFW diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 6beb855d..26de8ca2 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -3,7 +3,7 @@ // (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) // (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.) -#include +#include "imgui.h" #include "imgui_impl_glfw_gl3.h" #include #include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you. diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp b/examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp index 76def29c..801c433f 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp +++ b/examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include "imgui.h" #include "imgui_impl_sdl_gl2.h" // Data diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp index 21b567a8..bc475647 100644 --- a/examples/sdl_opengl2_example/main.cpp +++ b/examples/sdl_opengl2_example/main.cpp @@ -6,7 +6,7 @@ // **Prefer using the code in the sdl_opengl3_example/ folder** // See imgui_impl_sdl.cpp for details. -#include +#include "imgui.h" #include "imgui_impl_sdl_gl2.h" #include #include diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp index 7ee60389..6321181d 100644 --- a/examples/sdl_opengl3_example/main.cpp +++ b/examples/sdl_opengl3_example/main.cpp @@ -3,7 +3,7 @@ // (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) // (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.) -#include +#include "imgui.h" #include "imgui_impl_sdl_gl3.h" #include #include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you. diff --git a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp index 080d57d3..3748b504 100644 --- a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp +++ b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp @@ -6,7 +6,8 @@ // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // https://github.com/ocornut/imgui -#include +#include "imgui.h" +#include "imgui_impl_glfw_vulkan.h" // GLFW #define GLFW_INCLUDE_NONE @@ -19,8 +20,6 @@ #include #endif -#include "imgui_impl_glfw_vulkan.h" - // GLFW Data static GLFWwindow* g_Window = NULL; static double g_Time = 0.0f; diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp index 6c4ef33f..75b08d22 100644 --- a/examples/vulkan_example/main.cpp +++ b/examples/vulkan_example/main.cpp @@ -1,7 +1,8 @@ // ImGui - standalone example application for Glfw + Vulkan, using programmable pipeline // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. -#include +#include "imgui.h" +#include "imgui_impl_glfw_vulkan.h" #include // printf, fprintf #include // abort @@ -9,8 +10,6 @@ #define GLFW_INCLUDE_VULKAN #include -#include "imgui_impl_glfw_vulkan.h" - #define IMGUI_MAX_POSSIBLE_BACK_BUFFERS 16 #define IMGUI_UNLIMITED_FRAME_RATE //#ifdef _DEBUG