mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
remove null check during access
This commit is contained in:
parent
d846fe50a3
commit
7757e7ec9f
@ -88,7 +88,12 @@ public:
|
|||||||
|
|
||||||
constexpr T get() const
|
constexpr T get() const
|
||||||
{
|
{
|
||||||
Ensures(ptr_ != nullptr);
|
/*
|
||||||
|
not_null constructors and assignment operators always verify ptr_ is
|
||||||
|
not set to null. As long as references to ptr_ are not exposed publicly
|
||||||
|
it is not additionally necessary to check the value against nullptr here.
|
||||||
|
*/
|
||||||
|
// Ensures(ptr_ != nullptr);
|
||||||
return ptr_;
|
return ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user