diff options
-rw-r--r-- | sccomp/qa/unit/SwarmSolverTest.cxx | 21 | ||||
-rw-r--r-- | sccomp/qa/unit/solver.cxx | 3 |
2 files changed, 8 insertions, 16 deletions
diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx index b7d3becc475c..78cfccaaa376 100644 --- a/sccomp/qa/unit/SwarmSolverTest.cxx +++ b/sccomp/qa/unit/SwarmSolverTest.cxx @@ -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); diff --git a/sccomp/qa/unit/solver.cxx b/sccomp/qa/unit/solver.cxx index 4405279e26cb..eedbce69f274 100644 --- a/sccomp/qa/unit/solver.cxx +++ b/sccomp/qa/unit/solver.cxx @@ -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); |