Skip to content

Commit

Permalink
Used c++ cast instead of C cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Jul 22, 2024
1 parent 597ef05 commit 4ce75b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions BSCApp.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2023, Stefano Ceccherini <[email protected]>
* Copyright 2013-2024, Stefano Ceccherini <[email protected]>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "BSCApp.h"
Expand Down Expand Up @@ -290,7 +290,7 @@ BSCApp::MessageReceived(BMessage *message)
case kEncodingFinished:
{
status_t error;
message->FindInt32("status", (int32*)&error);
message->FindInt32("status", reinterpret_cast<int32*>(&error));
const char* fileName = NULL;
message->FindString("file_name", &fileName);
_EncodingFinished(error, fileName);
Expand Down Expand Up @@ -695,7 +695,7 @@ BSCApp::TogglePause()
int32
BSCApp::RecordedFrames() const
{
return atomic_get((int32*)&fNumFrames);
return atomic_get(const_cast<int32*>(&fNumFrames));
}


Expand Down
6 changes: 3 additions & 3 deletions OutputView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ OutputView::MessageReceived(BMessage *message)
BRect rect;
BBitmap* bitmap = NULL;
if (message != NULL && message->FindRect("selection", &rect) == B_OK
&& message->FindPointer("bitmap", (void**)&bitmap) == B_OK) {
&& message->FindPointer("bitmap", reinterpret_cast<void**>(&bitmap)) == B_OK) {
_UpdatePreview(&rect, bitmap);
delete bitmap;
}
Expand Down Expand Up @@ -251,7 +251,7 @@ OutputView::MessageReceived(BMessage *message)
fFileName->SetText(path.Path());

BFilePanel* filePanel = NULL;
if (message->FindPointer("source", (void**)&filePanel) == B_OK)
if (message->FindPointer("source", reinterpret_cast<void**>(&filePanel)) == B_OK)
delete filePanel;

_SetFileNameExtension(app->MediaFileFormat().file_extension);
Expand All @@ -264,7 +264,7 @@ OutputView::MessageReceived(BMessage *message)
case B_CANCEL:
{
BFilePanel* filePanel = NULL;
if (message->FindPointer("source", (void**)&filePanel) == B_OK)
if (message->FindPointer("source", reinterpret_cast<void**>(&filePanel)) == B_OK)
delete filePanel;
break;
}
Expand Down

0 comments on commit 4ce75b6

Please sign in to comment.