From 1c68815010c7b64275bd1bd27a40ebe0106de146 Mon Sep 17 00:00:00 2001 From: Kerstin Keller Date: Thu, 9 Jan 2025 18:07:26 +0100 Subject: [PATCH] [hdf5] Change the type of the hdf5 topic ID to unsigned int. --- contrib/ecalhdf5/src/hdf5_helper.h | 3 +-- .../measurement/base/include/ecal/measurement/base/types.h | 4 ++-- tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/contrib/ecalhdf5/src/hdf5_helper.h b/contrib/ecalhdf5/src/hdf5_helper.h index 6df5544800..2785e2acbd 100644 --- a/contrib/ecalhdf5/src/hdf5_helper.h +++ b/contrib/ecalhdf5/src/hdf5_helper.h @@ -54,8 +54,7 @@ inline std::string printHex(eCAL::experimental::measurement::base::Channel::id_t inline eCAL::experimental::measurement::base::Channel::id_t parseHexID(std::string string_id) { - auto unsigned_value = std::stoull(string_id, 0, 16); - return static_cast(unsigned_value); + return std::stoull(string_id, 0, 16); } namespace v6 diff --git a/contrib/measurement/base/include/ecal/measurement/base/types.h b/contrib/measurement/base/include/ecal/measurement/base/types.h index 43a3b5dad7..eccfa171cb 100644 --- a/contrib/measurement/base/include/ecal/measurement/base/types.h +++ b/contrib/measurement/base/include/ecal/measurement/base/types.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ namespace eCAL struct Channel { - using id_t = std::int64_t; + using id_t = std::uint64_t; std::string name = ""; id_t id = 0; diff --git a/tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp b/tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp index c8b775fb33..e124558ab3 100644 --- a/tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp +++ b/tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1032,7 +1032,6 @@ TEST(HDF5, PrintParseHex) std::vector numeric_values = { 0, - -1, 1, std::numeric_limits::min(), std::numeric_limits::max()