From b1e7b77077ef2fa4e314512812722aafdbe02f10 Mon Sep 17 00:00:00 2001 From: Javier Gil Aviles Date: Wed, 11 Dec 2024 13:38:51 +0100 Subject: [PATCH] Fix type variable error Signed-off-by: Javier Gil Aviles --- examples/cpp/benchmark/CLIParser.hpp | 4 ++-- examples/cpp/benchmark/PublisherApp.cpp | 4 ++-- examples/cpp/benchmark/PublisherApp.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/cpp/benchmark/CLIParser.hpp b/examples/cpp/benchmark/CLIParser.hpp index bb39f6cc980..2d6d4bc28c6 100644 --- a/examples/cpp/benchmark/CLIParser.hpp +++ b/examples/cpp/benchmark/CLIParser.hpp @@ -381,7 +381,7 @@ class CLIParser } else { - config.pub_config.interval = static_cast(input); + config.pub_config.interval = static_cast(input); } } catch (const std::invalid_argument& e) @@ -469,7 +469,7 @@ class CLIParser } else { - config.pub_config.end = static_cast(input); + config.pub_config.end = static_cast(input); } } catch (const std::invalid_argument& e) diff --git a/examples/cpp/benchmark/PublisherApp.cpp b/examples/cpp/benchmark/PublisherApp.cpp index 886e898affa..64860dc1ea4 100644 --- a/examples/cpp/benchmark/PublisherApp.cpp +++ b/examples/cpp/benchmark/PublisherApp.cpp @@ -421,8 +421,8 @@ void PublisherApp::run() { return; } - vSamples.push_back(count - prevCount); - prevCount = count; + vSamples.push_back(static_cast(count) - prevCount); + prevCount = static_cast(count); actualTime = std::chrono::steady_clock::now(); elapsed = std::chrono::duration_cast(actualTime - startTime); } diff --git a/examples/cpp/benchmark/PublisherApp.hpp b/examples/cpp/benchmark/PublisherApp.hpp index fb224610e9e..ffc05dfef2b 100644 --- a/examples/cpp/benchmark/PublisherApp.hpp +++ b/examples/cpp/benchmark/PublisherApp.hpp @@ -122,7 +122,7 @@ class PublisherApp : public Application, public DataWriterListener, public DataR std::atomic_uint count; - std::vector vSamples; + std::vector vSamples; std::chrono::time_point startTime;