hc
2024-08-14 d5ef2fdafdb09de9c2f876fc0edf2ba6bf224909
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From d1c6290fe9c8b01068abfca6f272e2a1e031b9de Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Wed, 5 May 2021 18:49:40 +0200
Subject: [PATCH] usrp2: Use explicit template type for std::min<T>
 
Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
[gwenhael.goavec-merou@trabucayre.com: backport from upstream]
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 host/lib/usrp/usrp2/usrp2_impl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 59fd9849c..e82a9fa71 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -845,7 +845,7 @@ double usrp2_impl::set_tx_dsp_freq(
         _tree->access<double>("/mboards/"+mb+"/tick_rate").get();
 
     //calculate the DAC shift (multiples of rate)
-    const int zone         = std::max(std::min(std::lround(new_freq / tick_rate), 2), -2);
+    const int zone         = std::max(std::min<int>(std::lround(new_freq / tick_rate), 2), -2);
     const double dac_shift = zone * tick_rate;
     new_freq -= dac_shift; //update FPGA DSP target freq
     UHD_LOG_TRACE("USRP2",
-- 
2.32.0