Campbell Barton
3d3bc74884
Cleanup: remove redundant const qualifiers for POD types
...
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
2022-01-07 14:16:26 +11:00
Campbell Barton
9e365069af
Cleanup: move public doc-strings into headers for 'blenlib'
...
- 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-12-09 20:01:44 +11:00
Campbell Barton
0d2589d08c
Cleanup: spelling
2021-08-04 10:03:07 +10:00
Campbell Barton
c3a400b73f
Cleanup: use single back-tick quoting in comments
...
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
2021-07-20 22:58:14 +10:00
Campbell Barton
f1e4903854
Cleanup: full sentences in comments, improve comment formatting
2021-06-26 21:50:48 +10:00
Campbell Barton
54b47da565
Cleanup: clang-format
2020-08-27 15:33:33 +10:00
Ray Molenkamp
f807b27b67
Cleanup: Fix const warning with BLI_array_free
...
when you call the BLI_array_free macro with a const pointer you get a
warning when the macro calls `MEM_freeN` (warning C4090: 'function':
different 'const' qualifiers)
This was warning originating from
`smart_uv_project_calculate_project_normals` in `uvedit_unwrap_ops.c`
Normally we resolve these with a non const cast at the callsite
but given BLI_array_free is a macro not a function this is not
an option here and it has to be resolved in the macro.
2020-08-26 11:42:40 -06:00
Jacques Lucke
91694b9b58
Code Style: use "#pragma once" in source directory
...
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton
249f4423ee
Cleanup: doxygen comments
...
Also correct some outdated symbol references,
add missing 'name' commands.
2019-11-25 01:51:11 +11:00
Campbell Barton
adae93281c
Cleanup: clang-format
2019-09-05 12:56:34 +10:00
Howard Trickey
bb8a9a6f8b
Fix BLI_array macro so can use BLI_strict_flags.h.
...
Was doing int comparision against size_t, so added casts.
2019-08-30 11:39:27 -04:00
Campbell Barton
e12c08e8d1
ClangFormat: apply to source, most of intern
...
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
de13d0a80c
doxygen: add newline after \file
...
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18
Cleanup: remove redundant doxygen \file argument
...
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
f20dbc293f
Cleanup: blank lines over doxy headers
2019-01-26 21:43:24 +11:00
Campbell Barton
342593f124
Cleanup: rename BLI_array_count -> len
...
Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.
2018-03-15 01:53:20 +11:00
Campbell Barton
078e012cd9
Cleanup: rename BLI_*_empty() -> clear()
...
Consistent with other BLI API's
2018-02-01 13:40:53 +11:00
Campbell Barton
393ba0cf16
Cleanup: multistatement-macros warning
2017-07-29 08:18:20 +10:00
Campbell Barton
00c4f49a6d
Cleanup: indentation, long lines
2017-06-12 13:38:21 +10:00
Campbell Barton
7a977df6d4
Refactor array_utils out of BLI_array
...
BLI_array.h is for resizing array macros, where as array_utils can operate on any arrays.
2015-02-14 08:00:41 +11:00
Campbell Barton
839e24c0c3
Correct recent error in BLI_array_append_ret
2014-09-28 17:29:48 +10:00
Campbell Barton
5f267ab9f3
BLI_array: add BLI_array_append_ret
...
returns the newly appended item.
also make make it so reserve doesn't have to grow then shrink the array size.
2014-09-28 15:08:54 +10:00
Campbell Barton
ed26d9dd90
BLI_array: utility function for searching an array
2014-08-17 16:02:20 +10:00
Campbell Barton
9142c062e0
Remove MSVC2008 workaround
2014-08-14 14:18:37 +10:00
Campbell Barton
78d38a9033
BLI_array: avoid mixing terms count/length
2014-07-11 15:30:42 +10:00
Campbell Barton
974d2dc54a
BLI_array: avoid accidental assignment to BLI_array_count
2014-06-27 00:31:50 +10:00
Campbell Barton
898667b497
Fix BLI_array_staticdeclare size
2014-06-27 00:20:17 +10:00
Campbell Barton
8beb565c59
code cleanup: headers - doxy comments.
2013-09-12 03:02:50 +00:00
Campbell Barton
5ba898d868
utility functions to reverse and wrap arrays.
2013-08-13 23:43:44 +00:00
Campbell Barton
fc4a777511
use '_exec' suffix for operator execute callbacks, also picky change to sizeof() use in BLI_array.h
2013-07-28 17:06:31 +00:00
Campbell Barton
4982f200fa
move alloca define into its own header since its not related to BLI_array
2013-07-28 10:38:25 +00:00
Campbell Barton
72f2917032
bmesh: skip error checks when building in release mode (minor speedup),
...
also more strict use of BLI_array_declare(), only allow after array is declared.
2013-07-28 09:05:27 +00:00
Campbell Barton
4c66463218
code cleanup: quiet pedantic warning in array macro.
2013-05-25 22:26:41 +00:00
Thomas Dinges
858ff6b696
Fix for [ #34898 ] Typo in error message of mathutils.Vector
...
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
Campbell Barton
38cee985bb
code cleanup: style & warnings.
2013-01-21 02:30:40 +00:00
Campbell Barton
7c75bfd744
minor change r53918 was supposed to resolve.
2013-01-20 11:54:43 +00:00
Campbell Barton
8aa891ac6d
correction for msvc2008
2013-01-20 08:43:44 +00:00
Campbell Barton
23af6743c7
code cleanup: BLI_array.h's BLI_array_grow_items macro was unmanageable.
...
moved the main re-alloc logic into a C function.
2013-01-19 07:35:55 +00:00
Campbell Barton
f25618f29a
make Node.links return a tuple, this may you can't do socket.links.append() by mistake.
...
removed RNAMeta mixin class since you cant register subclasses.
also some minor code cleanup
2012-12-21 12:16:13 +00:00
Campbell Barton
0f97d53c74
add include so alloca() is found on mingw.
2012-12-13 11:59:07 +00:00
Campbell Barton
1eadcf743d
fix for building with msvc
2012-12-11 15:29:08 +00:00
Campbell Barton
71730f26d7
replace BLI_array_fixedstack_declare with() new macro BLI_array_alloca() which uses stack memory always and doesn't need to be freed explicitly.
2012-12-11 15:10:19 +00:00
Campbell Barton
6857d31180
fix [ #33305 ] Bevel tool crashes Blender if the number of segments exceeds 28
...
this was infact a general bug in BLI_array_grow_items(), surprising we didnt run into it before.
- growing the array for the first time would use the static var even if it wasn't big enough.
2012-11-26 04:58:33 +00:00
Campbell Barton
b96c622015
style cleanup
2012-08-11 22:12:32 +00:00
Campbell Barton
0107385f7f
code cleanup: ensure macros require ';' endings
2012-08-08 21:20:10 +00:00
Campbell Barton
15cb064e1b
style cleanup
2012-06-25 07:24:48 +00:00
Campbell Barton
9892736206
code cleanup: header cleanup and remove some duplicate defines.
2012-05-12 20:39:39 +00:00
Campbell Barton
ef054e165c
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
2012-04-28 15:14:16 +00:00
Campbell Barton
2118d3c19c
code cleanup: bmesh comments/todos, no functional changes.
2012-04-26 08:27:50 +00:00