Simplify Sequences initializations (sccomp)

Change-Id: I6316e1318ae1ee68e5d4e4529731bca0d1860b58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116932
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet 2021-06-09 18:14:41 +02:00
parent 8ed68179e2
commit 5897a97bb5
2 changed files with 8 additions and 16 deletions

View file

@ -75,8 +75,7 @@ void SwarmSolverTest::testUnconstrained()
table::CellAddress aObjective(0, 1, 1);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(1);
aVariables[0] = table::CellAddress(0, 1, 0);
uno::Sequence<table::CellAddress> aVariables{ { 0, 1, 0 } };
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints;
@ -125,8 +124,7 @@ void SwarmSolverTest::testVariableBounded()
table::CellAddress aObjective(0, 1, 1);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(1);
aVariables[0] = table::CellAddress(0, 1, 0);
uno::Sequence<table::CellAddress> aVariables{ { 0, 1, 0 } };
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints(2);
@ -177,8 +175,7 @@ void SwarmSolverTest::testVariableConstrained()
table::CellAddress aObjective(0, 1, 1);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(1);
aVariables[0] = table::CellAddress(0, 1, 0);
uno::Sequence<table::CellAddress> aVariables{ { 0, 1, 0 } };
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints(3);
@ -233,9 +230,7 @@ void SwarmSolverTest::testTwoVariables()
table::CellAddress aObjective(0, 1, 5);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(2);
aVariables[0] = table::CellAddress(0, 1, 2);
aVariables[1] = table::CellAddress(0, 1, 3);
uno::Sequence<table::CellAddress> aVariables{ { 0, 1, 2 }, { 0, 1, 3 } };
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints(4);
@ -299,11 +294,9 @@ void SwarmSolverTest::testMultipleVariables()
table::CellAddress aObjective(0, 5, 7);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(4);
aVariables[0] = table::CellAddress(0, 6, 1);
aVariables[1] = table::CellAddress(0, 6, 2);
aVariables[2] = table::CellAddress(0, 6, 3);
aVariables[3] = table::CellAddress(0, 6, 4);
uno::Sequence<table::CellAddress> aVariables{
{ 0, 6, 1 }, { 0, 6, 2 }, { 0, 6, 3 }, { 0, 6, 4 }
};
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints(12);

View file

@ -87,8 +87,7 @@ void LpSolverTest::testSolver(OUString const & rName)
table::CellAddress aObjective(0, 0, 0);
// "changing cells" - unknown variables
uno::Sequence<table::CellAddress> aVariables(1);
aVariables[0] = table::CellAddress(0, 0, 0);
uno::Sequence<table::CellAddress> aVariables { {0, 0, 0 } };
// constraints
uno::Sequence<sheet::SolverConstraint> aConstraints(1);