mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Remove null check inside not_null::get (#1067)
Guidelines issue 2006 removes the null check inside not_null::get, since the contained pointer is already guaranteed to be not-null upon construction. Resolves #1051
This commit is contained in:
parent
f3620bb009
commit
6c6111acb7
@ -117,7 +117,6 @@ public:
|
||||
not_null& operator=(const not_null& other) = default;
|
||||
constexpr details::value_or_reference_return_t<T> get() const
|
||||
{
|
||||
Ensures(ptr_ != nullptr);
|
||||
return ptr_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user