File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ namespace snmalloc
101101 H ptr;
102102
103103 public:
104- ChildRef () : ptr( nullptr ) {}
104+ constexpr ChildRef () = default;
105105
106106 ChildRef (H p) : ptr(p) {}
107107
@@ -232,7 +232,14 @@ namespace snmalloc
232232 struct RBStep
233233 {
234234 ChildRef node;
235- bool dir = false ;
235+ bool dir;
236+
237+ // Default constructor needed for Array<RBStep, 128>.
238+ constexpr RBStep () = default;
239+
240+ // Remove copy constructors to avoid accidentally copying and mutating the path.
241+ RBStep (const RBStep& other) = delete ;
242+ RBStep& operator =(const RBStep& other) = delete ;
236243
237244 /* *
238245 * Update the step to point to a new node and direction.
Original file line number Diff line number Diff line change @@ -282,6 +282,11 @@ namespace snmalloc
282282 uintptr_t * val;
283283
284284 public:
285+ /* *
286+ * Uninitialised constructor.
287+ */
288+ BackendStateWordRef () = default ;
289+
285290 /* *
286291 * Constructor, wraps a `uintptr_t`. Note that this may be used outside
287292 * of the meta entry by code wishing to provide uniform storage to things
You can’t perform that action at this time.
0 commit comments