Skip to content

Commit

Permalink
Removed C-style casts
Browse files Browse the repository at this point in the history
In c++ code would be cleaner to use
c++ retinterpret cast instead of old
c-style notation

Change-Id: Ibeef5e0c374addf108c0a8876a6be45063d8e396
  • Loading branch information
miklelappo committed Mar 23, 2017
1 parent 0d264bf commit 20791bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void RecoveryUI::ProcessKey(int key_code, int updown) {
}

void* RecoveryUI::time_key_helper(void* cookie) {
key_timer_t* info = (key_timer_t*) cookie;
key_timer_t* info = static_cast<key_timer_t*>(cookie);
info->ui->time_key(info->key_code, info->count);
delete info;
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion updater/blockimg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static bool receive_new_data(const uint8_t* data, size_t size, void* cookie) {
}

static void* unzip_new_data(void* cookie) {
NewThreadInfo* nti = (NewThreadInfo*) cookie;
NewThreadInfo* nti = static_cast<NewThreadInfo*>(cookie);
ProcessZipEntryContents(nti->za, &nti->entry, receive_new_data, nti);
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion wear_touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void WearSwipeDetector::run() {
}

void* WearSwipeDetector::touch_thread(void* cookie) {
((WearSwipeDetector*)cookie)->run();
(static_cast<WearSwipeDetector*>(cookie))->run();
return NULL;
}

Expand Down

0 comments on commit 20791bd

Please sign in to comment.