Commit Graph

33 Commits

Author SHA1 Message Date
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
cf93b65a65 Cleanup: make remaining blenlib headers work in C++
Differential Revision: https://developer.blender.org/D6988

Reviewers: brecht
2020-03-02 15:05:15 +01:00
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
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
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
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
5513da65b2 Cleanup: trailing space for BLI 2018-06-17 16:32:54 +02:00
ccdacf1c9b Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
d4aaa4f9b6 cleanup: use const for smallhash & minor edits 2014-12-18 13:12:25 +01:00
d5abe8419d Smallhash: add support for iterating value pointers
also add reinsert function
2014-12-09 17:18:05 +01:00
151800662f Smallhash: BLI_smallhash_calc_quality
Also add inline hashing function to measure different methods.
2014-08-23 21:18:11 +10:00
c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
7c9b106589 Smallhash: optimizations
- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.
2014-02-02 02:24:48 +11:00
1f64371ec0 Smallhash: refactor and fixes
- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p
2014-01-30 21:10:55 +11:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
1fb980e7df reduce sign conversion comparisons for smallhash and tweak warnings elsewhere. 2013-06-22 20:20:06 +00:00
4c042f2145 bmesh: optimize bmesh_vert_separate, redice allocs (best cast it wont do any allocs).
gives approx 16% overall speedup to edgesplit modifier.

also reduce size of smallhash stack, was 521, which got doubled and was quite large on the stack. reduce to 64.
2013-05-09 12:46:35 +00:00
62db610220 use unsigned int's for smallhash, avoids using ABS when converting an
int from a key.
2013-05-08 12:54:07 +00:00
01f8b229c9 revert own change from 56177, game bounds can be useful to see in editmode,
also use gcc attributes for smallhash header and some style edits to recent commit.
2013-04-20 17:24:40 +00:00
9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
d7f0e29291 Few files had got +x mode which seems to be totally unnecessary. 2012-02-27 12:48:06 +00:00
2fcb6d058e style cleanup for bmesh headers
- use consistant header guards
- correct doxy comments
- remove ED_toolmode.h (unused)
2012-02-12 14:40:08 +00:00
91390b712a GPL Header Cleanup 2012-02-11 04:16:17 +00:00
fa59b80189 move smallhash into its own C file, was inlineing fairly large functions. 2011-09-09 02:52:20 +00:00
7cf87f7e32 Fix BLI_smallhash for 0 and negative keys. Fixes some problems with edge snapping in knife tool. 2011-09-06 13:48:20 +00:00
5f75407e22 change TODO -> BMESH_TODO if only on bmesh branch 2011-08-07 12:45:55 +00:00
25ffeed8bf fixing compile errors with VisualStudio 2008.
* macro ABS has no effect with uintptr_t anyway and was throwing warning (promoted to error) -> commented out and marked with TODO
* removed two unused variables trhowing warning also promoted to error when compiling.
2011-07-03 17:07:07 +00:00
1c56255ca7 =bmesh=
Edge slide now handles facedata (e.g. sliding within uv
space), including multires.
2011-04-13 21:48:16 +00:00
1216fe7f21 =bmesh=
Bevel! Implemented bevel (from scratch).  Man is
this tool way cooler then I thought it was.  Note that
uv/vcol interpolation is working (loop level data) but 
vert/edge data (like vgroups) likely still needs
work.
2011-03-17 22:59:54 +00:00
f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
1e513ec02d knife bugfix. more to come. 2010-10-04 04:35:42 +00:00
421823e34e =BMesh: Super Knife Tool Alpha=
Implemented a new "super knife".  Activate with k.  Holding CTRL
will allow extended cutting ala old lines mode.  Confirm with enter 
and escape. You cannot cancel, btw, you can only confirm (and undo 
later if you want). Hopefully I'll support undo within the tool soon.

* Supports cutting edges, into faces, etc.  You can pretty much do whatever 
  you want.  Will snap to vertices too.
* Note that if you cut into a face, it must be valid topologically when 
  you press enter to confirm.
* It's pretty and graphical :)
* You can only cut visible geometry.
* UVs/vcols are a little buggy still

Now, thou shalt all cease and desist all lack of motivation for
testing!  No longer shall users put off testing until "it's cooler"!

:P
2010-09-25 01:54:58 +00:00