[hamradio-commits] [gnss-sdr] 166/251: fixing incorrect expression

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:46 UTC 2015


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 4c0243580b718185b54dbd40345efa543f02d0aa
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Mon Jun 1 19:27:58 2015 +0200

    fixing incorrect expression
---
 src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc
index c9c8574..acb5097 100644
--- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc
+++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc
@@ -65,7 +65,7 @@ void load_random_data(void *data, volk_gnsssdr_type_t type, unsigned int n)
             if(type.is_signed) int_max /= 2.0;
             for(unsigned int i=0; i<n; i++)
                 {
-                    float scaled_rand = (((float) (rand() - (RAND_MAX / 2.0))) / static_cast<float>((RAND_MAX / 2.0))) * int_max;
+                    float scaled_rand = (((float)(rand() - (RAND_MAX / 2.0))) / (float)((RAND_MAX / 2.0))) * int_max;
                     //man i really don't know how to do this in a more clever way, you have to cast down at some point
                     switch(type.size)
                     {

-- 
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