Skip to content

Commit d2f9c7c

Browse files
committed
Fix style in ONNXModelLoader
1 parent 9867b53 commit d2f9c7c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lib/Importer/ONNXModelLoader.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,13 +1454,18 @@ Error ONNXModelLoader::loadSlice(const ONNX_NAMESPACE::NodeProto &op,
14541454
} else if (stepC->getElementType() == ElemKind::Int32ITy) {
14551455
helperSetter<int32_t>(stepC, step);
14561456
} else {
1457-
RETURN_ERR_IF_NOT(false,
1458-
opErrMsg(op, strFormat("Step Tensor has unsupported type '%s'", stepC->getType()->getElementName().str().c_str())));
1457+
RETURN_ERR_IF_NOT(
1458+
false,
1459+
opErrMsg(
1460+
op,
1461+
strFormat("Step Tensor has unsupported type '%s'",
1462+
stepC->getType()->getElementName().str().c_str())));
14591463
}
14601464

14611465
// Step is interpreted 1 as default.
14621466
for (size_t i = 0; i < step.size(); i++) {
1463-
RETURN_ERR_IF_NOT(step[i] == 1, opErrMsg(op, "step!=1 is currently not supported"));
1467+
RETURN_ERR_IF_NOT(step[i] == 1,
1468+
opErrMsg(op, "step!=1 is currently not supported"));
14641469
}
14651470
}
14661471
}

tests/unittests/OnnxImporterTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2757,7 +2757,8 @@ TEST_F(OnnxImporterTest, importSliceWithStep) {
27572757
}
27582758

27592759
TEST_F(OnnxImporterTest, importSliceWithUnsupportedStep) {
2760-
importSliceTest("sliceWithUnsupportedStep.onnxtxt", "data", {2, 3, 3, 3} /* input */,
2760+
importSliceTest("sliceWithUnsupportedStep.onnxtxt", "data",
2761+
{2, 3, 3, 3} /* input */,
27612762
{0, 1, 1, 1} /* starts */, /* ends: {2, 2, 3, 3} */
27622763
{2, 1, 2, 2} /* output */, true);
27632764
}

0 commit comments

Comments
 (0)