[Positioner] Fix a few small issues
Fix three minor performance issues signaled by cppcheck and a couple of problems with Doxygen.
This commit is contained in:
parent
e9cecbe1c0
commit
081c559fc5
|
@ -26,7 +26,7 @@ protected:
|
|||
const std::string name ;
|
||||
|
||||
public:
|
||||
PositioningAlgorithm(const std::string _name = "UnknownAlgorithm"):
|
||||
PositioningAlgorithm(const std::string &_name = "UnknownAlgorithm"):
|
||||
name(_name) {}
|
||||
virtual ~PositioningAlgorithm(void) {}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ using std::tr1::unordered_map ;
|
|||
Request::Request(
|
||||
const Mobile *_mobile,
|
||||
const Timestamp &_time_sent,
|
||||
const std::tr1::unordered_map<std::string, Measurement> &_measurements
|
||||
const std::tr1::unordered_map<string, Measurement> &_measurements
|
||||
):
|
||||
type(OWL_REQUEST_UNDEFINED), nb_packets(1),
|
||||
mobile(const_cast<Mobile*>(_mobile)), time_sent(_time_sent),
|
||||
|
@ -40,7 +40,7 @@ Request::Request(
|
|||
}
|
||||
|
||||
|
||||
Request::Request(const std::tr1::unordered_map<std::string, Measurement>
|
||||
Request::Request(const std::tr1::unordered_map<string, Measurement>
|
||||
&_measurements):
|
||||
type(OWL_REQUEST_UNDEFINED), nb_packets(1),
|
||||
mobile(NULL), measurements(_measurements), real_position(NULL)
|
||||
|
@ -51,7 +51,7 @@ Request::Request(const std::tr1::unordered_map<std::string, Measurement>
|
|||
|
||||
Request::Request(
|
||||
const Timestamp &_time_sent,
|
||||
const std::tr1::unordered_map<std::string, Measurement> &_measurements
|
||||
const std::tr1::unordered_map<string, Measurement> &_measurements
|
||||
):
|
||||
type(OWL_REQUEST_UNDEFINED), nb_packets(1),
|
||||
mobile(NULL), time_sent(_time_sent),
|
||||
|
|
|
@ -241,7 +241,7 @@ inline Request::operator bool() const
|
|||
return
|
||||
mobile != NULL ||
|
||||
time_sent ||
|
||||
measurements.size() > 0 ;
|
||||
! measurements.empty() ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -289,7 +289,6 @@ void Stock::update_all_friis_indexes()
|
|||
for (unordered_map<string, AccessPoint>::iterator ap = aps.begin() ;
|
||||
ap != aps.end() ; ++ap)
|
||||
{
|
||||
string ap_mac = ap->second.get_mac_addr() ;
|
||||
double friis_idx_sum = 0 ;
|
||||
int nb_friis_idx = 0 ;
|
||||
|
||||
|
|
|
@ -109,8 +109,8 @@ Timestamp Timestamp::get_current_time()
|
|||
|
||||
|
||||
/**
|
||||
* @source A pointer to the new time. If NULL, #current_time is updated
|
||||
* to the current time.
|
||||
* @arg source A pointer to the new time. If NULL, #current_time is
|
||||
* updated to the current time.
|
||||
*/
|
||||
void Timestamp::update_current_time(const Timestamp &source)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue