Skip to content

Commit

Permalink
[hdf5] Change the type of the hdf5 topic ID to unsigned int.
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstinKeller committed Jan 9, 2025
1 parent b3023ae commit 1c68815
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions contrib/ecalhdf5/src/hdf5_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<eCAL::experimental::measurement::base::Channel::id_t>(unsigned_value);
return std::stoull(string_id, 0, 16);
}

namespace v6
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/contrib/ecalhdf5/hdf5_test/src/hdf5_test.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -1032,7 +1032,6 @@ TEST(HDF5, PrintParseHex)
std::vector<Channel::id_t> numeric_values =
{
0,
-1,
1,
std::numeric_limits<Channel::id_t>::min(),
std::numeric_limits<Channel::id_t>::max()
Expand Down

0 comments on commit 1c68815

Please sign in to comment.