Skip to content

Commit

Permalink
Remove unnecessary casts from C++ HelloWorld example (#540)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Govostes <[email protected]>
  • Loading branch information
rgov authored Aug 7, 2023
1 parent 3355a19 commit 71657be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/Examples/C++/DDSHelloWorld/src/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ int main(
char** argv)
{
std::cout << "Starting publisher." << std::endl;
int samples = 10;
uint32_t samples = 10;

HelloWorldPublisher* mypub = new HelloWorldPublisher();
if(mypub->init())
{
mypub->run(static_cast<uint32_t>(samples));
mypub->run(samples);
}

delete mypub;
Expand Down
4 changes: 2 additions & 2 deletions code/Examples/C++/DDSHelloWorld/src/HelloWorldSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ int main(
char** argv)
{
std::cout << "Starting subscriber." << std::endl;
int samples = 10;
uint32_t samples = 10;

HelloWorldSubscriber* mysub = new HelloWorldSubscriber();
if(mysub->init())
{
mysub->run(static_cast<uint32_t>(samples));
mysub->run(samples);
}

delete mysub;
Expand Down

0 comments on commit 71657be

Please sign in to comment.