diff --git a/include/xo/alloc/Forwarding1.hpp b/include/xo/alloc/Forwarding1.hpp index 88ca849a..8999849a 100644 --- a/include/xo/alloc/Forwarding1.hpp +++ b/include/xo/alloc/Forwarding1.hpp @@ -32,7 +32,7 @@ namespace xo { /** required by Object i/face, but never called on Forwarding1 **/ virtual Object * _shallow_copy(gc::IAlloc * mm) const final override; /** required by Object i/face, but never called on Forwarding1 **/ - virtual std::size_t _forward_children(gc::GC * mm) final override; + virtual std::size_t _forward_children(gc::IAlloc * mm) final override; private: /** the object that used to be located at this address (i.e. @c this) diff --git a/include/xo/alloc/Object.hpp b/include/xo/alloc/Object.hpp index f1d03225..f16dd6ac 100644 --- a/include/xo/alloc/Object.hpp +++ b/include/xo/alloc/Object.hpp @@ -119,17 +119,17 @@ namespace xo { * @p src. source object to be forwarded * @p gc. garbage collector */ - static Object * _forward(Object * src, gc::GC * gc); + static Object * _forward(Object * src, gc::IAlloc * gc); template - static void _forward_inplace(T ** src_addr, gc::GC * gc) { + static void _forward_inplace(T ** src_addr, gc::IAlloc * gc) { Object * fwd = _forward(*src_addr, gc); *src_addr = reinterpret_cast(fwd); } template - static void _forward_inplace(gp & src, gc::GC * gc) { + static void _forward_inplace(gp & src, gc::IAlloc * gc) { _forward_inplace(src.ptr_address(), gc); } @@ -243,7 +243,7 @@ namespace xo { * allocated by @ref _shallow_move * **/ - virtual std::size_t _forward_children(gc::GC * gc) = 0; + virtual std::size_t _forward_children(gc::IAlloc * gc) = 0; }; template diff --git a/src/alloc/Forwarding1.cpp b/src/alloc/Forwarding1.cpp index 2cc183d5..f94bf4f1 100644 --- a/src/alloc/Forwarding1.cpp +++ b/src/alloc/Forwarding1.cpp @@ -60,7 +60,7 @@ namespace xo { // LCOV_EXCL_START std::size_t - Forwarding1::_forward_children(gc::GC *) { + Forwarding1::_forward_children(gc::IAlloc *) { assert(false); return 0; } diff --git a/src/alloc/Object.cpp b/src/alloc/Object.cpp index 560f941b..dbb86ae2 100644 --- a/src/alloc/Object.cpp +++ b/src/alloc/Object.cpp @@ -24,7 +24,7 @@ namespace xo { Object::mm = nullptr; Object * - Object::_forward(Object * src, gc::GC * gc) + Object::_forward(Object * src, gc::IAlloc * gc) { if (!src) return src; diff --git a/utest/Forwarding1.test.cpp b/utest/Forwarding1.test.cpp index 2dcb5efe..19d9bf1e 100644 --- a/utest/Forwarding1.test.cpp +++ b/utest/Forwarding1.test.cpp @@ -34,7 +34,7 @@ namespace xo { virtual std::size_t _shallow_size() const final override { return sizeof(*this); } virtual Object * _shallow_copy(gc::IAlloc * mm) const final override { return new (Cpof(mm, this)) DummyObject(*this); } - virtual std::size_t _forward_children(gc::GC * gc) final override { return _shallow_size(); } + virtual std::size_t _forward_children(gc::IAlloc * gc) final override { return _shallow_size(); } private: std::array data_;