[ox] Remove redundant null check before delete
This commit is contained in:
parent
d3f78982e6
commit
3facd25794
@ -11,7 +11,7 @@
|
|||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
FileLocation::~FileLocation() {
|
FileLocation::~FileLocation() {
|
||||||
if (m_type == Path && m_data.path) {
|
if (m_type == Path) {
|
||||||
delete m_data.path;
|
delete m_data.path;
|
||||||
m_data.path = nullptr;
|
m_data.path = nullptr;
|
||||||
}
|
}
|
||||||
|
2
deps/ox/src/ox/std/vector.hpp
vendored
2
deps/ox/src/ox/std/vector.hpp
vendored
@ -99,10 +99,8 @@ Vector<T>::Vector(Vector<T> &&other) noexcept {
|
|||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
Vector<T>::~Vector() noexcept {
|
Vector<T>::~Vector() noexcept {
|
||||||
if (m_items) {
|
|
||||||
delete[] m_items;
|
delete[] m_items;
|
||||||
m_items = nullptr;
|
m_items = nullptr;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user