Timer/Ticker - fix constness of the data argument/member

pull/1125/head
0xc0170 2015-05-21 08:36:58 +01:00
parent 1f6ad3fbb3
commit f0038f84e8
4 changed files with 5 additions and 5 deletions

View File

@ -60,7 +60,7 @@ public:
Ticker() : TimerEvent() {
}
Ticker(const ticker_data_t *const data) : TimerEvent(data) {
Ticker(const ticker_data_t *data) : TimerEvent(data) {
}
/** Attach a function to be called by the Ticker, specifiying the interval in seconds

View File

@ -46,7 +46,7 @@ class Timer {
public:
Timer();
Timer(const ticker_data_t *const data);
Timer(const ticker_data_t *data);
/** Start the timer
*/
@ -83,7 +83,7 @@ protected:
int _running; // whether the timer is running
unsigned int _start; // the start time of the latest slice
int _time; // any accumulated time from previous slices
const ticker_data_t *const _ticker_data;
const ticker_data_t *_ticker_data;
};
} // namespace mbed

View File

@ -47,7 +47,7 @@ protected:
ticker_event_t event;
const ticker_data_t *const _ticker_data;
const ticker_data_t *_ticker_data;
};
} // namespace mbed

View File

@ -23,7 +23,7 @@ Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data(
reset();
}
Timer::Timer(const ticker_data_t *const data) : _running(), _start(), _time(), _ticker_data(data) {
Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data) {
reset();
}