Now always check for a default unit, and evaluate the whole expression in this "unit space".
Not an ideal solution, but should handle most cases nicely
(we can't address all possible corner cases anyway).
Note default unit is searched in current string first (bigger unit of current system wins),
then in previous string.
Note this also replaces ',' by '+' in default separation between units,
helps solving issues with parenthesis (e.g. (1'1")*2.5 would fail in existing code)!
This would break if someone uses py ops with lower precedence than '+' (like bitwise
operations, and comparison), but these are not expected usecase here anyway.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D340
- add BLI_stack_count
- add BLI_stack_pop_n to pop into an array
- add BLI_stack_push_r, which returns a pointer that can be filled in
Also remove sanity check in BLI_stack_pop, assert if the stack is empty.
Needed to make the blender link libraries a global property
now that tests are parallel to source directory.
Current sort order for blender link libraries doesn't work
for tests that start with few defined symbols. Doubling the
lib list works, but a TODO to find a better way (probably
using CMake's own mechanism for tracking dependencies).