You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bartosz Taudul 6469b94304
Silence memset warning. (#3505)
Compiling the code as-is results in the following warning:

-->8--
imgui_freetype.cpp:341:72: warning: ‘void* memset(void*, int, size_t)’
        clearing an object of type ‘struct ImFontBuildSrcDataFT’ with no
        trivial copy-assignment; use assignment or value-initialization
        instead [-Wclass-memaccess]
  341 |     memset(src_tmp_array.Data, 0, (size_t)src_tmp_array.size_in_bytes());
      |                                                                        ^
imgui_freetype.cpp:302:8: note: ‘struct ImFontBuildSrcDataFT’ declared here
  302 | struct ImFontBuildSrcDataFT
      |        ^~~~~~~~~~~~~~~~~~~~
--8<--

This is caused by presence of ImVector<> directly in ImFontBuildSrcDataFT data
structure, as well as in the child ImBitVector. Since ImVector<> has a
constructor, the compiler infers that initialization by memset is not valid.
Such initialization is not a bug, however, as the default ImVector<> ctor just
sets the structure data members to 0, which is exactly what the memset does.

Casting the data structure address to void* pointer silences this warning.
4 years ago
..
cpp Fixed stray end of line blanks, added comments in .editorconfig, tweaked some headers. 5 years ago
fonts Misc: Bunch of code formatting changes suggested by a pass running 'astyle' 4 years ago
freetype Silence memset warning. (#3505) 4 years ago
natvis Removed trailing spaces from text files. (#2038, #2299) 6 years ago
single_file Fixed stray end of line blanks, added comments in .editorconfig, tweaked some headers. 5 years ago
README.txt Comments + minor moving 5 years ago

README.txt

misc/cpp/
  InputText() wrappers for C++ standard library (STL) type: std::string.
  This is also an example of how you may wrap your own similar types.

misc/fonts/
  Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts).
  Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code.
  Suggested fonts and links.

misc/freetype/
  Font atlas builder/rasterizer using FreeType instead of stb_truetype.
  Benefit from better FreeType rasterization, in particular for small fonts.

misc/natvis/
  Natvis file to describe dear imgui types in the Visual Studio debugger.
  With this, types like ImVector<> will be displayed nicely in the debugger.
  You can include this file a Visual Studio project file, or install it in Visual Studio folder.

misc/single_file/
  Single-file header stub.
  We use this to validate compiling all *.cpp files in a same compilation unit.
  Users of that technique (also called "Unity builds") can generally provide this themselves,
  so we don't really recommend you use this in your projects.