Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-09Cleanup: move public doc-strings into headers for 'blenlib'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-07-12Blenlib: Add BLI_assert_msg() for printing an extra string if the assert failsJulian Eisel
It always bothered me that we'd do the `BLI_assert(... || !"message")` trick to print a message alongside the assert, while it should be trivial to have a way to pass an extra string as additional argument. This adds `BLI_assert_msg()` with a second argument for a message. E.g.: ``` BLI_assert_msg( params->rename_id == NULL, "File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile."); ``` On failure this will print like this: ``` 0 Blender 0x00000001140647a3 BLI_system_backtrace + 291 [...] 13 Blender 0x00000001092647a6 main + 3814 14 libdyld.dylib 0x00007fff203d8f5d start + 1 BLI_assert failed: source/blender/editors/space_file/file_ops.c:2352, file_directory_new_exec(), at 'params->rename_id == ((void*)0)' File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile. ``` Reviewed by: Sybren Stüvel, Jacques Lucke, Sergey Sharybin, Campbell Barton Differential Revision: https://developer.blender.org/D11827
2021-03-23BLI: add macro to indicate unreachable codeJacques Lucke
This adds a `BLI_assert_unreachable()` macro, that should be used instead of `BLI_assert(false)` in many places. * `BLI_assert_unreachable` provides more information than `BLI_assert(false)` to people reading the code. * `BLI_assert_unreachable` will print an error to `stderr` in a release build. This makes it more likely that we will get bug reports when the assumptions of a developer were wrong. Differential Revision: https://developer.blender.org/D10780
2020-09-04Cleanup: fix compiler warnings for MSVCBrecht Van Lommel
2020-08-06Cleanup: avoid debug-only includes for BLI_assert.hCampbell Barton
Having includes in debug builds makes it possible to accidentally break release builds. Avoid this by moving calls to other modules out of BLI_assert.h into BLI_assert.c