Misc comments, removed duplicated IM_ARRAYSIZE macro in imgui_demo.cpp (it is now declared in imgui.h)
This commit is contained in:
parent
3a4a2bb27c
commit
8d54b1b7af
@ -8,7 +8,7 @@
|
||||
// Gallery (please post your screenshots/video there!): https://github.com/ocornut/imgui/issues/1269
|
||||
// Developed by Omar Cornut and every direct or indirect contributors to the GitHub.
|
||||
// This library is free but I need your support to sustain development and maintenance.
|
||||
// If you work for a company, please consider financial support, e.g: https://www.patreon.com/imgui
|
||||
// If you work for a company, please consider financial support, see Readme. For individuals: https://www.patreon.com/imgui
|
||||
|
||||
/*
|
||||
|
||||
|
@ -7,16 +7,16 @@
|
||||
// During development, you can call ImGui::ShowDemoWindow() in your code to learn about various features of ImGui. Have it wired in a debug menu!
|
||||
// Removing this file from your project is hindering access to documentation for everyone in your team, likely leading you to poorer usage of the library.
|
||||
// Note that you can #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h for the same effect.
|
||||
// If you want to link core ImGui in your public builds but not those demo windows, #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h and those functions will be empty.
|
||||
// For any other case, if you have ImGui available you probably want this to be available for reference and execution.
|
||||
// If you want to link core ImGui in your final builds but not those demo windows, #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h and those functions will be empty.
|
||||
// In other situation, when you have ImGui available you probably want this to be available for reference and execution.
|
||||
// Thank you,
|
||||
// -Your beloved friend, imgui_demo.cpp (that you won't delete)
|
||||
|
||||
// Message to beginner C/C++ programmer about the meaning of 'static': in this demo code, we frequently we use 'static' variables inside functions.
|
||||
// We do this as a way to gather code and data in the same place, make the demo code faster to read, faster to write, and smaller. A static variable persist across calls,
|
||||
// so it is essentially like a global variable but declared inside the scope of the function.
|
||||
// Message to beginner C/C++ programmers. About the meaning of 'static': in this demo code, we frequently we use 'static' variables inside functions.
|
||||
// We do this as a way to gather code and data in the same place, just to make the demo code faster to read, faster to write, and use less code.
|
||||
// A static variable persist across calls, so it is essentially like a global variable but declared inside the scope of the function.
|
||||
// It also happens to be a convenient way of storing simple UI related information as long as your function doesn't need to be reentrant or used in threads.
|
||||
// This may be a pattern you want to use in your code (simple is beautiful!), but most of the real data you would be editing is likely to be stored outside your function.
|
||||
// This might be a pattern you occasionally want to use in your code, but most of the real data you would be editing is likely to be stored outside your function.
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
@ -52,18 +52,17 @@
|
||||
#pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function
|
||||
#pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value
|
||||
#if (__GNUC__ >= 6)
|
||||
#pragma GCC diagnostic ignored "-Wmisleading-indentation" // warning: this 'if' clause does not guard this statement // GCC 6.0+ only. See #883 on github.
|
||||
#pragma GCC diagnostic ignored "-Wmisleading-indentation" // warning: this 'if' clause does not guard this statement // GCC 6.0+ only. See #883 on GitHub.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n.
|
||||
// Play it nice with Windows users. Notepad in 2017 still doesn't display text data with Unix-style \n.
|
||||
#ifdef _WIN32
|
||||
#define IM_NEWLINE "\r\n"
|
||||
#else
|
||||
#define IM_NEWLINE "\n"
|
||||
#endif
|
||||
|
||||
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
|
||||
#define IM_MAX(_A,_B) (((_A) >= (_B)) ? (_A) : (_B))
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user