Skip to content

Commit b2ef3a2

Browse files
committed
Formatting
Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
1 parent 4f5ac1c commit b2ef3a2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/python-nanobind/py_paramvalue.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ paramvalue_from_pyobject(string_view name, TypeDesc type, int nvalues,
9898
}
9999
} else if (type.basetype == TypeDesc::UINT8 && type.arraylen
100100
&& nb::isinstance<nb::bytes>(obj)) {
101-
TypeDesc t = type;
102-
nb::bytes b = nb::cast<nb::bytes>(obj);
101+
TypeDesc t = type;
102+
nb::bytes b = nb::cast<nb::bytes>(obj);
103103
const std::string s(b.c_str(), b.size());
104104
if (t.arraylen < 0)
105105
t.arraylen = static_cast<int>(s.size()) / nvalues;
106106
if (t.arraylen * nvalues == static_cast<int>(s.size())) {
107-
std::vector<uint8_t> vals(
108-
reinterpret_cast<const uint8_t*>(s.data()),
109-
reinterpret_cast<const uint8_t*>(s.data()) + s.size());
107+
std::vector<uint8_t> vals(reinterpret_cast<const uint8_t*>(s.data()),
108+
reinterpret_cast<const uint8_t*>(s.data())
109+
+ s.size());
110110
pv.init(name, t, nvalues, interp, vals.data());
111111
}
112112
} else if (type.basetype == TypeDesc::UINT8) {

0 commit comments

Comments
 (0)