Use std::bind instead of std::bind1st and std::bind2nd

This commit is contained in:
Tobias Blomberg 2022-05-27 17:33:44 +02:00
parent 0a48e9ee8f
commit c0266909f6
3 changed files with 8 additions and 6 deletions

View File

@ -83,6 +83,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
****************************************************************************/
using namespace std;
using namespace std::placeholders;
using namespace Async;
@ -501,7 +502,7 @@ int main(int argc, const char *argv[])
vector<float> mod_idxs(mod_fqs.size());
transform(mod_fqs.begin(), mod_fqs.end(), mod_idxs.begin(),
bind1st(divides<float>(), caldev));
std::bind(divides<float>(), caldev, _1));
float mod_level = 100.0 * caldev / (maxdev * pow(10.0, headroom_db / 20.0));
cout << "--- Modulation frequencies [Hz] : ";
copy(mod_fqs.begin(), mod_fqs.end(), ostream_iterator<float>(cout, " "));

View File

@ -71,6 +71,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
****************************************************************************/
using namespace std;
using namespace std::placeholders;
@ -387,7 +388,7 @@ void WbRxRtlSdr::rtlReadyStateChanged(void)
vector<float> tuner_gains;
tuner_gains.assign(int_tuner_gains.begin(), int_tuner_gains.end());
transform(tuner_gains.begin(), tuner_gains.end(),
tuner_gains.begin(), bind2nd(divides<float>(),10.0));
tuner_gains.begin(), std::bind(divides<float>(), _1, 10.0));
cout << "\tValid tuner gains : ";
copy(tuner_gains.begin(), tuner_gains.end(),
ostream_iterator<float>(cout, " "));

View File

@ -11,7 +11,7 @@ LIBECHOLIB=1.3.3.99.2
LIBASYNC=1.6.99.22
# SvxLink versions
SVXLINK=1.7.99.69
SVXLINK=1.7.99.70
MODULE_HELP=1.0.0
MODULE_PARROT=1.1.1
MODULE_ECHO_LINK=1.5.99.3
@ -25,13 +25,13 @@ MODULE_FRN=1.1.0
MODULE_TRX=1.0.0
# Version for the RemoteTrx application
REMOTE_TRX=1.3.99.10
REMOTE_TRX=1.3.99.11
# Version for the signal level calibration utility
SIGLEV_DET_CAL=1.0.7.99.6
SIGLEV_DET_CAL=1.0.7.99.7
# Version for the deviation calibration utility
DEVCAL=1.0.2.99.7
DEVCAL=1.0.2.99.8
# Version for svxserver
SVXSERVER=0.0.6