[ox] Remove redundant null check before delete
This commit is contained in:
parent
d3f78982e6
commit
3facd25794
@ -11,7 +11,7 @@
|
||||
namespace ox {
|
||||
|
||||
FileLocation::~FileLocation() {
|
||||
if (m_type == Path && m_data.path) {
|
||||
if (m_type == Path) {
|
||||
delete m_data.path;
|
||||
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>
|
||||
Vector<T>::~Vector() noexcept {
|
||||
if (m_items) {
|
||||
delete[] m_items;
|
||||
m_items = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user