GPv3: Refactor code for the hard eraser #111390

Merged
Amélie Fondevilla merged 9 commits from amelief/blender:gpv3-erase-operator-refactor into main 2023-08-23 14:13:56 +02:00
Showing only changes of commit d40685e1ce - Show all commits

View File

@ -115,11 +115,11 @@ struct EraseOperationExecutor {
struct SegmentCircleIntersection {
/* Position of the intersection in the segment. */
float factor{0.0f};
float factor = 0.0f;
amelief marked this conversation as resolved Outdated

It's not in the style guide I guess, but usually these defaults are written with =

It's not in the style guide I guess, but usually these defaults are written with `=`
/* True if the intersection corresponds to an inside/outside transition with respect to the
* circle, false if it corresponds to an outside/inside transition . */
bool inside_outside_intersection{false};
bool inside_outside_intersection = false;
};
enum PointCircleSide { Outside, OutsideInsideBoundary, InsideOutsideBoundary, Inside };
amelief marked this conversation as resolved Outdated

enum class is generally preferred since it requires each item to be scoped with the name of the enum. Though it's a bit longer, the context is usually helpful when reading code.

`enum class` is generally preferred since it requires each item to be scoped with the name of the enum. Though it's a bit longer, the context is usually helpful when reading code.