Age | Commit message (Collapse) | Author |
|
|
|
The new reverse iterators behave as the reverse iterators for contains from
the standard library. Have a look at the tests to see how to use them.
Using them will hopefully become easier with ranges in C++20.
A Vector can now be constructed from two iterators, which is very common
in the standard library.
New Vector.insert methods allow adding elements in the middle of a vector.
These methods should not be used often in practice, because they has a linear running time.
New Vector.prepend methods allow adding elements to the beginning of a vector.
These methods are O(n) as well.
|
|
|
|
Mainly caused by moving tests to source folder, which brings
new compiler flags.
Also, no need to extend include directories (to the non-existing paths,
btw) since this is done by the CmakeList.txt which is in the blenlib folder.
|
|
The file was including BKE. It was a required fix for another
compilation error a while back. It is a bad level include, and
seems is not needed anymore.
|
|
|
|
Since C++17 there is also std::string_view, which is similar to StringRef.
This commit does a couple of things:
* New implicit conversions between StringRef and std::string_view.
* Support std::string_view in blender::DefaultHash.
* Support most of the methods that std::string_view has.
* Add StringRef::not_found which can be used instead of -1 in some places.
* Improve/fix the description at the top of BLI_string_ref.hh.
|
|
And make them part of the blender_test runner. The one exception is blenlib
performance tests, which we don't want to run by default. They remain in their
own executable.
Differential Revision: https://developer.blender.org/D8498
|
|
|
|
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3`
that incorrectly confirms some intersections of coplanar segments to the triangle.
The solution is to use another algorithm to detect intersections.
This also resulted in a slight improvement in the performance:
- 1min 17sec to 1min 6sec in my test file
Differential Revision: https://developer.blender.org/D8500
|
|
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
|
|
|
|
This is a followup of d4bd0789abb6e7805e07636232cec4480028f6d1, as it was
lacking a bit of an explanation.
No functional changes.
|
|
This adds a `NOLINT` marker to explicitly silence a warning from
Clang-Tidy's `readability-function-size` rule for the `incircleadapt()`
function in `delaunay_2d.c`.
No functional changes.
|
|
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
|
|
Those were missing from the previous commit, because these headers
only exist in the `master` and not in the `blender-v2.90-release` branch.
|
|
|
|
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
|
|
|
|
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
|
|
|
|
This method sets the label of an edge in a dot graph.
|
|
Conflicts:
source/blender/editors/gpencil/gpencil_primitive.c
|
|
|
|
|
|
|
|
Also order return matrices last.
|
|
Also order return matrices last.
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
|
|
|
|
|
|
|
|
Covers basics like generation of new UUID.
Also contains code needed to use the SessionUUID as a key in the Map.
|
|
|
|
|
|
These precision issues were evident in corrected uvs when the option
`"Correct Face Attributes"` is enabled.
|
|
|
|
|
|
This is handy to add support for enums used in both C and C++
files. This removes the need to typecast each time for every
operation.
Only support bitwise operators for now.
|
|
|
|
|
|
The name was misleading as it returns true whenever it intersects the
line represented by the points.
|
|
This is a convenience wrapper for `Map<Key, Vector<Value>>`.
It does not provide any performance benefits (yet). I need this
kind of map in a couple of places and before I was duplicating
the lookup logic in many places.
|