Skip to content

Commit 8d367b3

Browse files
committed
formattting
Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
1 parent b8278b8 commit 8d367b3

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/python/py_backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ make_tuple(size_t size, F&& fill)
136136
return result;
137137
}
138138

139-
inline constexpr auto ref = py::return_value_policy::reference;
139+
inline constexpr auto ref = py::return_value_policy::reference;
140140
inline constexpr auto ref_internal = py::return_value_policy::reference_internal;
141141

142142
template<typename T>

src/python/py_oiio.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,12 @@ namespace {
258258
delete[] reinterpret_cast<T*>(p);
259259
});
260260
if (dims == 4) {
261-
return py::cast(
262-
py::ndarray<py::numpy, T>(
263-
mem, { depth, height, width, chans }, owner,
264-
{ py::ssize_t(height * width * chans),
265-
py::ssize_t(width * chans), py::ssize_t(chans),
266-
py::ssize_t(1) }),
267-
py::rv_policy::move);
261+
return py::cast(py::ndarray<py::numpy, T>(
262+
mem, { depth, height, width, chans }, owner,
263+
{ py::ssize_t(height * width * chans),
264+
py::ssize_t(width * chans),
265+
py::ssize_t(chans), py::ssize_t(1) }),
266+
py::rv_policy::move);
268267
}
269268
if (dims == 3 && depth == 1) {
270269
return py::cast(py::ndarray<py::numpy, T>(
@@ -274,11 +273,11 @@ namespace {
274273
py::rv_policy::move);
275274
}
276275
if (dims == 2 && depth == 1 && height == 1) {
277-
return py::cast(
278-
py::ndarray<py::numpy, T>(mem, { width, chans }, owner,
279-
{ py::ssize_t(chans),
280-
py::ssize_t(1) }),
281-
py::rv_policy::move);
276+
return py::cast(py::ndarray<py::numpy, T>(mem, { width, chans },
277+
owner,
278+
{ py::ssize_t(chans),
279+
py::ssize_t(1) }),
280+
py::rv_policy::move);
282281
}
283282
return oiio_py::make_numpy_array(mem, size);
284283
#else

src/python/py_texturesys.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class TextureOptWrap : public TextureOpt {
2424
}
2525

2626
// std::optional so nanobind maps Python None -> nullopt (py::object rejects None).
27-
void set_missingcolor(const std::optional<py::object>& py_m_missingcolor_data)
27+
void
28+
set_missingcolor(const std::optional<py::object>& py_m_missingcolor_data)
2829
{
2930
m_missingcolor_data.clear();
3031
if (!py_m_missingcolor_data) {

0 commit comments

Comments
 (0)