| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 59d02e6 commit 7d210b1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,7 +91,7 @@ namespace xt | |||
| 91 | 91 | void resize(const S& shape, const strides_type& strides); | |
| 92 | 92 | ||
| 93 | 93 | template <class S = shape_type> | |
| 94 | - void reshape(S&& shape, layout_type layout = base_type::static_layout); | ||
| 94 | + auto& reshape(S&& shape, layout_type layout = base_type::static_layout) &; | ||
| 95 | 95 | ||
| 96 | 96 | layout_type layout() const; | |
| 97 | 97 | ||
@@ -205,7 +205,7 @@ namespace xt | |||
| 205 | 205 | } | |
| 206 | 206 | ||
| 207 | 207 | template <class T> | |
| 208 | - void default_initialize_impl(T& storage, std::false_type) | ||
| 208 | + void default_initialize_impl(T& /*storage*/, std::false_type) | ||
| 209 | 209 | { | |
| 210 | 210 | } | |
| 211 | 211 | ||
@@ -407,7 +407,7 @@ namespace xt | |||
| 407 | 407 | ||
| 408 | 408 | template <class D> | |
| 409 | 409 | template <class S> | |
| 410 | - inline void pycontainer<D>::reshape(S&& shape, layout_type layout) | ||
| 410 | + inline auto& pycontainer<D>::reshape(S&& shape, layout_type layout) & | ||
| 411 | 411 | { | |
| 412 | 412 | if (compute_size(shape) != this->size()) | |
| 413 | 413 | { | |
@@ -437,6 +437,7 @@ namespace xt | |||
| 437 | 437 | this->ptr() = new_ptr; | |
| 438 | 438 | Py_XDECREF(old_ptr); | |
| 439 | 439 | this->derived_cast().init_from_python(); | |
| 440 | + return *this; | ||
| 440 | 441 | } | |
| 441 | 442 | ||
| 442 | 443 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments