From 345b62dd38f96edd50381c806ef16ce58df0367e Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 12 Mar 2012 15:48:32 +0100 Subject: [PATCH] Bug 1374 - Path to solve variable length array of non-POD element --- src/lte/examples/lte-multiple-flows.cc | 2 +- src/lte/test/lte-propagation-loss-model-test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lte/examples/lte-multiple-flows.cc b/src/lte/examples/lte-multiple-flows.cc index b7a569374..b2e002866 100644 --- a/src/lte/examples/lte-multiple-flows.cc +++ b/src/lte/examples/lte-multiple-flows.cc @@ -66,7 +66,7 @@ int main (int argc, char *argv[]) Ptr enb; enb = enbDevs.Get (0)->GetObject (); - Ptr ue[nbUE]; + std::vector< Ptr >ue (nbUE); for (int i = 0; i < nbUE; i++) { ue[i] = ueDevs.Get (i)->GetObject (); diff --git a/src/lte/test/lte-propagation-loss-model-test.cc b/src/lte/test/lte-propagation-loss-model-test.cc index 6f601c095..0dc96a448 100644 --- a/src/lte/test/lte-propagation-loss-model-test.cc +++ b/src/lte/test/lte-propagation-loss-model-test.cc @@ -170,8 +170,8 @@ Ns3LtePropagationLossModelTestCase::DoRun (void) int nbOfValues = tx.size (); for (int i = 0; i < nbOfValues; i++) { - NS_TEST_ASSERT_MSG_EQ (tx.at (i) == 0 && rx.at (i) != 0, false, "Problem with elements of tx and rx."); - NS_TEST_ASSERT_MSG_EQ (tx.at (i) != 0 && (tx.at (i) <= rx.at (i)), false, "Problem with elements of tx and rx."); + NS_TEST_ASSERT_MSG_EQ ((tx.at (i) == 0 && rx.at (i) != 0), false, "Problem with elements of tx and rx."); + NS_TEST_ASSERT_MSG_EQ ((tx.at (i) != 0 && (tx.at (i) <= rx.at (i))), false, "Problem with elements of tx and rx."); }