summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2003-03-31 10:21:22 (UTC)
committer mickeyl <mickeyl>2003-03-31 10:21:22 (UTC)
commit636449b2246963c2c9e48163332a0227036e4364 (patch) (unidiff)
treec7383136a93938584b80b8f59c756733772d314d /libopie2
parent2318b309ef4c5147fa1a975b7b261ceec5dd13a7 (diff)
downloadopie-636449b2246963c2c9e48163332a0227036e4364.zip
opie-636449b2246963c2c9e48163332a0227036e4364.tar.gz
opie-636449b2246963c2c9e48163332a0227036e4364.tar.bz2
resolve potential ambiguities in pow()
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index cd36f16..50d67bb 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -388,17 +388,17 @@ void OWirelessNetworkInterface::init()
388 if ( !wioctl( SIOCGIWRANGE ) ) 388 if ( !wioctl( SIOCGIWRANGE ) )
389 { 389 {
390 qDebug( "OWirelessNetworkInterface::init(): SIOCGIWRANGE failed (%s)", strerror( errno ) ); 390 qDebug( "OWirelessNetworkInterface::init(): SIOCGIWRANGE failed (%s)", strerror( errno ) );
391 return; 391 return;
392 } 392 }
393 393
394 for ( int i = 0; i < range.num_frequency; ++i ) 394 for ( int i = 0; i < range.num_frequency; ++i )
395 { 395 {
396 int freq = (int) ( double( range.freq[i].m ) * pow( 10, range.freq[i].e ) / 1000000.0 ); 396 int freq = (int) ( double( range.freq[i].m ) * pow( 10.0, range.freq[i].e ) / 1000000.0 );
397 _channels.insert( freq, i+1 ); 397 _channels.insert( freq, i+1 );
398 } 398 }
399} 399}
400 400
401 401
402QString OWirelessNetworkInterface::associatedAP() const 402QString OWirelessNetworkInterface::associatedAP() const
403{ 403{
404 //FIXME: use OMacAddress 404 //FIXME: use OMacAddress
@@ -431,17 +431,17 @@ int OWirelessNetworkInterface::channel() const
431 return _hopper->channel(); 431 return _hopper->channel();
432 432
433 if ( !wioctl( SIOCGIWFREQ ) ) 433 if ( !wioctl( SIOCGIWFREQ ) )
434 { 434 {
435 return -1; 435 return -1;
436 } 436 }
437 else 437 else
438 { 438 {
439 return _channels[ static_cast<int>(double( _iwr.u.freq.m ) * pow( 10, _iwr.u.freq.e ) / 1000000) ]; 439 return _channels[ static_cast<int>(double( _iwr.u.freq.m ) * pow( 10.0, _iwr.u.freq.e ) / 1000000) ];
440 } 440 }
441} 441}
442 442
443 443
444void OWirelessNetworkInterface::setChannel( int c ) const 444void OWirelessNetworkInterface::setChannel( int c ) const
445{ 445{
446 if ( !_mon ) 446 if ( !_mon )
447 { 447 {
@@ -460,17 +460,17 @@ void OWirelessNetworkInterface::setChannel( int c ) const
460double OWirelessNetworkInterface::frequency() const 460double OWirelessNetworkInterface::frequency() const
461{ 461{
462 if ( !wioctl( SIOCGIWFREQ ) ) 462 if ( !wioctl( SIOCGIWFREQ ) )
463 { 463 {
464 return -1.0; 464 return -1.0;
465 } 465 }
466 else 466 else
467 { 467 {
468 return double( _iwr.u.freq.m ) * pow( 10, _iwr.u.freq.e ) / 1000000000.0; 468 return double( _iwr.u.freq.m ) * pow( 10.0, _iwr.u.freq.e ) / 1000000000.0;
469 } 469 }
470} 470}
471 471
472 472
473int OWirelessNetworkInterface::channels() const 473int OWirelessNetworkInterface::channels() const
474{ 474{
475 return _channels.count(); 475 return _channels.count();
476} 476}