From 8d2ee6d040cbc3ada5b7354049946acab0bd5d06 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Fri, 23 Jun 2017 13:49:53 +0200 Subject: [PATCH] timer okl4: remove deprecated const_cast Ref #2400 --- repos/os/src/drivers/timer/pit/time_source.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/repos/os/src/drivers/timer/pit/time_source.cc b/repos/os/src/drivers/timer/pit/time_source.cc index 737126d104..1be2055640 100644 --- a/repos/os/src/drivers/timer/pit/time_source.cc +++ b/repos/os/src/drivers/timer/pit/time_source.cc @@ -70,16 +70,9 @@ Duration Timer::Time_source::curr_time() { uint32_t passed_ticks; - /* - * Read PIT count and status - * - * Reading the PIT registers via port I/O is a non-const operation. - * Since 'curr_time' is declared as const, however, we need to - * explicitly override the const-ness of the 'this' pointer. - */ + /* read PIT count and status */ bool wrapped; - uint16_t const curr_counter = - const_cast(this)->_read_counter(&wrapped); + uint16_t const curr_counter = _read_counter(&wrapped); /* determine the time since we looked at the counter */ if (wrapped && !_handled_wrap) {