Skip to content

Commit

Permalink
empty pointer can be OK as long as size is 0 which is the (perhaps du…
Browse files Browse the repository at this point in the history
…mb) design for an unitialized tensor
  • Loading branch information
robertjharrison committed Oct 25, 2023
1 parent e65c0d9 commit eb8e13d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/madness/tensor/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1819,13 +1819,13 @@ MADNESS_PRAGMA_GCC(diagnostic pop)

/// Returns a pointer to the internal data
T* ptr() {
MADNESS_ASSERT(_p);
//MADNESS_ASSERT(_p);
return _p;
}

/// Returns a pointer to the internal data
const T* ptr() const {
MADNESS_ASSERT(_p);
//MADNESS_ASSERT(_p);
return _p;
}

Expand Down

0 comments on commit eb8e13d

Please sign in to comment.