Bastien Montagne
8be4c6e8f3
Timing macros: remove the (void)0 at the end of TIMEIT_BLOCK_INIT,
...
it prevents declaring/using more than one of these timing blocks in a same code block
(C rule, no var declaration and code mixing)...
2014-01-21 15:50:44 +01:00
Bastien Montagne
7acb7cb897
Replace XOR swapping by default ("naive", with extra var) one.
...
Ref: http://en.wikipedia.org/wiki/XOR_swap_algorithm , modern compilers/CPUs are much more efficient with "naive" algo than XOR one.
Doubled check, for me in an optimized build, XOR is several times slower than naive algo.
2014-01-21 15:50:44 +01:00
Brecht Van Lommel
dcba34b411
Fix T38303: same names with different case sorted unpredictable in the file browser.
...
The string comparison was in lower case, so the same strings with different case
were considered the same which can make qsort give different results on each
sort since it's not a stable sort. Now take case into account in comparison.
2014-01-21 14:59:12 +01:00
Campbell Barton
37242e6b0b
Code Cleanup: style
2014-01-21 12:05:27 +11:00
Campbell Barton
621bf47e91
Docs: doxygen file descriptions for BLF, GPU and WM
2014-01-19 23:15:25 +11:00
Sergej Reich
a025ff407e
Math: Code cleanup
...
Remove stray #undef directives.
2014-01-17 20:44:34 +01:00
Campbell Barton
af93ebcb50
Code Cleanup: style and redundant casts
2014-01-16 19:15:53 +11:00
Campbell Barton
b8b412230b
Code Cleanup: use iroundf
...
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
Campbell Barton
da8619fe23
Math Lib: add iroundf function for: (int)floorf(a + 0.5f)
2014-01-15 13:40:40 +11:00
Antonis Ryakiotakis
53f93ef66d
Fix build issues with mingw's
2014-01-15 00:33:55 +02:00
Gaia Clary
875ddfcee0
Added missing include
2014-01-14 22:54:18 +01:00
Campbell Barton
a9f761708c
Fix for icon generation with MSVC
...
Big thanks to Gaia for getting this working!
2014-01-15 08:40:56 +11:00
Sergey Sharybin
43c2b36431
Correction to assert in previous commit
2014-01-14 23:51:26 +06:00
Sergey Sharybin
e7d18eb7bd
Add check for KD tree size to BLI_kdtree_insert()
...
Makes sure we're not trying to insert more nodes than we've
been expecting to.
2014-01-14 17:16:06 +06:00
Campbell Barton
aa986c3f3d
Correct bad mistake in own recent to commit to angle calculation
2014-01-14 13:47:24 +11:00
Campbell Barton
8cb9b42c9c
Math Lib: minor optimization for angle functions
2014-01-14 09:48:59 +11:00
Campbell Barton
61ff3dfdda
Code Cleanup: spelling
2014-01-13 15:31:57 +11:00
Antonis Ryakiotakis
717bf85545
Fix some harmless warnings that mostly appeared on MinGW64
2014-01-13 04:28:51 +02:00
Campbell Barton
62aa004c25
Style Cleanup: whitespace
2014-01-12 22:05:24 +11:00
Campbell Barton
b243b4fe40
Fix for inorrect use of BLI_utf8_invalid_strip, add assert to prevent it happening again.
2014-01-08 14:46:06 +11:00
Campbell Barton
fee66f7bc8
Code cleanup: defines for statfs were getting out of hand for BSD's.
...
add __DragonFly__ and internal defines to avoid copy-pasting checks.
also remove __CYGWIN32__ check, since cygwin is no longer supported.
2014-01-07 13:39:00 +11:00
Campbell Barton
99d050f88b
Text3d: selection in editmode now follows rotated text along path
2014-01-05 22:20:33 +11:00
Antonis Ryakiotakis
1f2aec71b4
Fix for previous commit...sorry!
2014-01-04 13:47:40 +02:00
Antonis Ryakiotakis
baa1ae0749
Fix MinGW32 compilation
2014-01-04 13:39:10 +02:00
Campbell Barton
fd6ef46d6d
KDTree: ensure balance runs before usage (in debug mode)
2014-01-04 10:44:02 +11:00
Campbell Barton
a288644b1e
Code Cleanup: WIN32 defines, check for _MSC_VER instead of !FREE_WINDOWS
2014-01-03 20:46:12 +11:00
Martijn Berger
46a3752a1f
Fix :I broke the build for MSVC 2008 this fixes it
2014-01-02 23:32:44 +01:00
Martijn Berger
1c8a12ee61
Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems
2014-01-02 22:19:10 +01:00
Sergey Sharybin
df5631216a
Fix T37980: Multiple font objects sharing an external font gives problems
...
Solved by adding RW lock to BKE_vfont_to_curve.
So now all the threads are allowed to read chars from ghash,
but they'll be locked as soon as one thread would need to load
more chars from font to the ghash.
2013-12-29 16:44:07 +06:00
Campbell Barton
d0ec1b1caa
Fix for 3d text ctrl+arrow keys failing for multi-byte characters.
2013-12-29 16:54:43 +11:00
Campbell Barton
07851dd8df
Math Lib: replace point in polygon function with one thats ~23x faster.
...
rather then using angle summing, use line intersection checks.
2013-12-29 14:50:15 +11:00
Campbell Barton
eb4090dadf
Fix missing check if isect_plane_plane_v3 fails to find an intersection.
2013-12-29 12:51:27 +11:00
Campbell Barton
2654b28f04
Text3d: avoid calculating the font boundbox scale for every character
2013-12-28 19:45:54 +11:00
Campbell Barton
1a91b8bd5d
Fix for 3d fonts loading the character of the string terminator.
...
also remove redundant call to wcslen and ensure FT_Init_FreeType runs
once the font loads.
2013-12-28 19:06:45 +11:00
Campbell Barton
961d0409c8
3D Text: use ghash for character lookups
2013-12-28 17:40:13 +11:00
Campbell Barton
6f5ced4a30
Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-text
2013-12-28 17:23:59 +11:00
Campbell Barton
bc1eb0bf0a
Simplify isect_point_poly_v2 functions using angle_signed_v2v2
2013-12-26 20:07:44 +11:00
Campbell Barton
db8293d456
Polyfill: minor changes to which fix rare errors with float precision
2013-12-26 12:21:40 +11:00
Campbell Barton
af32c1c77b
Fix T37946: Error filling ngons
2013-12-26 12:06:52 +11:00
Campbell Barton
7f4533fa49
String API: BLI_ascii_strtolower/upper now check NULL terminator
...
This wasn't needed before now, but since recent change to bUnit_ReplaceString,
it uses in a context where NULL terminator is expected - best add.
(spotted by Sergey)
2013-12-25 01:20:46 +11:00
Campbell Barton
c1c26c36f6
Style Cleanup: remove preprocessor indentation (updated wiki style guide too)
2013-12-22 14:12:19 +11:00
Campbell Barton
737e51cb21
Mempool/Memarena: hint for unlikely conditions
2013-12-10 21:28:52 +11:00
Campbell Barton
c005fb407b
Util-defines: avoid multiple calculation/access for MIN/MAX macros
2013-12-08 17:29:22 +11:00
Campbell Barton
8a9a060b67
Math lib: optimize hsv/rgb conversion
2013-12-08 17:20:53 +11:00
Campbell Barton
f64b3732be
Util Macros: reduce multiple access & conversion for CLAMP/CLAMPIS/ABS
2013-12-07 14:29:27 +11:00
Campbell Barton
69065b5b2c
Compiler warnings: quiet warnings for gcc4.7x
...
patch from Sergey
2013-12-07 13:21:59 +11:00
Campbell Barton
72d950ba49
Rectangle API: add single axis intersection check
2013-12-06 18:48:55 +11:00
Antonis Ryakiotakis
4b9fb83e67
Appease grumpy ole gcc 4.7 of MinGW64 (possibly gcc 4.6 of MinGW32 too?)
...
that cannot convert float to char without false warnings that are turned
into errors with strict flags. I expect that any real conversion
warnings can be caught on linux.
2013-12-05 23:32:59 +02:00
Campbell Barton
07ceb99213
Code Cleanup: use strict flags for math lib, add inline declarations
2013-12-06 03:57:17 +11:00
Campbell Barton
8003f0606d
Compiler warnings: quiet float/double conversion warning
2013-12-05 10:34:30 +11:00