Skip to content

Commit bb429dd

Browse files
check if data_ is empty, NOT data
1 parent db13196 commit bb429dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TiledArray/tensor/tensor_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class TensorInterface {
179179
/// \param data The data pointer for this tensor
180180
TensorInterface(const range_type& range, pointer data)
181181
: range_(range), data_(data) {
182-
TA_ASSERT(data);
182+
TA_ASSERT(data_);
183183
}
184184

185185
/// Construct a new view of \c tensor
@@ -188,7 +188,7 @@ class TensorInterface {
188188
/// \param data The data pointer for this tensor
189189
TensorInterface(range_type&& range, pointer data)
190190
: range_(std::move(range)), data_(data) {
191-
TA_ASSERT(data);
191+
TA_ASSERT(data_);
192192
}
193193

194194
template <typename T1, typename std::enable_if<detail::is_nested_tensor<

0 commit comments

Comments
 (0)