mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 06:07:59 +00:00
nic_router: safe pointers that are valid and const
Add safe pointer constructor that takes a reference as argument to enable the use of the safe pointer wrapper as const object. Ref #2670
This commit is contained in:
parent
2c2037952d
commit
8fff7df438
@ -33,6 +33,8 @@ class Net::Pointer
|
||||
|
||||
Pointer() : _ptr(nullptr) { }
|
||||
|
||||
Pointer(T &ref) : _ptr(&ref) { }
|
||||
|
||||
T &deref() const
|
||||
{
|
||||
if (_ptr == nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user