Skip to content

Commit

Permalink
Fix type variable error
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Gil Aviles <javiergil@eprosima.com>
  • Loading branch information
Javgilavi committed Dec 11, 2024
1 parent 54b8494 commit b1e7b77
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/cpp/benchmark/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class CLIParser
}
else
{
config.pub_config.interval = static_cast<uint32_t>(input);
config.pub_config.interval = static_cast<uint16_t>(input);
}
}
catch (const std::invalid_argument& e)
Expand Down Expand Up @@ -469,7 +469,7 @@ class CLIParser
}
else
{
config.pub_config.end = static_cast<uint32_t>(input);
config.pub_config.end = static_cast<uint16_t>(input);
}
}
catch (const std::invalid_argument& e)
Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/benchmark/PublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ void PublisherApp::run()
{
return;
}
vSamples.push_back(count - prevCount);
prevCount = count;
vSamples.push_back(static_cast<uint16_t>(count) - prevCount);
prevCount = static_cast<uint16_t>(count);
actualTime = std::chrono::steady_clock::now();
elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(actualTime - startTime);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/benchmark/PublisherApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class PublisherApp : public Application, public DataWriterListener, public DataR

std::atomic_uint count;

std::vector<int16_t> vSamples;
std::vector<uint16_t> vSamples;

std::chrono::time_point<std::chrono::steady_clock> startTime;

Expand Down

0 comments on commit b1e7b77

Please sign in to comment.