[hamradio-commits] [gnss-sdr] 96/303: Fix crash

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit 1dfb0e30877ce3224691196b8c21f402570ecd7c
Author: Carles Fernandez <carlesfernandez at gmail.com>
Date:   Mon Oct 10 15:22:42 2016 +0200

    Fix crash
---
 src/tests/system-tests/ttff_gps_l1.cc | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc
index cc10640..088b61e 100644
--- a/src/tests/system-tests/ttff_gps_l1.cc
+++ b/src/tests/system-tests/ttff_gps_l1.cc
@@ -477,16 +477,16 @@ TEST_F(TTFF_GPS_L1_CA_Test, ColdStart)
     for(int n = 0; n < FLAGS_num_measurements; n++)
         {
             // Create a new ControlThread object with a smart pointer
-            std::unique_ptr<ControlThread> control_thread;
-
+            std::shared_ptr<ControlThread> control_thread;
             if(FLAGS_config_file_ttff.empty())
             {
-                std::unique_ptr<ControlThread> control_thread(new ControlThread(config));
+                control_thread = std::make_shared<ControlThread>(config);
             }
             else
             {
-                std::unique_ptr<ControlThread> control_thread(new ControlThread(config2));
+                control_thread = std::make_shared<ControlThread>(config2);
             }
+
             // record startup time
             struct timeval tv;
             gettimeofday(&tv, NULL);
@@ -559,18 +559,17 @@ TEST_F(TTFF_GPS_L1_CA_Test, HotStart)
     config2->set_property("GNSS-SDR.SUPL_read_gps_assistance_xml", "true");
     config2->set_property("PVT.flag_rtcm_server", "false");
 
-    std::unique_ptr<ControlThread> control_thread;
-
     for(int n = 0; n < FLAGS_num_measurements; n++)
         {
             // Create a new ControlThread object with a smart pointer
+            std::shared_ptr<ControlThread> control_thread;
             if(FLAGS_config_file_ttff.empty())
             {
-                std::unique_ptr<ControlThread> control_thread(new ControlThread(config));
+                control_thread = std::make_shared<ControlThread>(config);
             }
             else
             {
-               std::unique_ptr<ControlThread> control_thread(new ControlThread(config2));
+                control_thread = std::make_shared<ControlThread>(config2);
             }
             // record startup time
             struct timeval tv;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list