Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef FFW_ROBOT_MANAGER__BATTERY_MODEL_HPP_
#define FFW_ROBOT_MANAGER__BATTERY_MODEL_HPP_

#include <cstdint>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While adding <cstdint> correctly resolves the compilation error in this header, there are a few related improvements to consider for full GCC 15 compatibility and standard compliance:

  1. Direct Inclusions: Other files in the package also use fixed-width integer types without directly including <cstdint> (e.g., uint16_t in ubetter_battery_model.hpp and uint32_t in ffw_robot_manager.cpp). Although they may currently receive the header transitively through this file, it is best practice for each file to include the headers it depends on directly.
  2. Namespace Qualification: In C++, types from <cstdint> are defined in the std namespace. It is recommended to use std::uint8_t, std::uint16_t, etc., instead of the global namespace versions (e.g., at line 68 of this file) for better portability and adherence to the C++ standard.

#include <string>
#include <memory>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


#include <algorithm>
#include <cstdint>
#include <string>
#include <vector>
#include <unordered_map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef FFW_ROBOT_MANAGER__UBETTER_BATTERY_MODEL_HPP_
#define FFW_ROBOT_MANAGER__UBETTER_BATTERY_MODEL_HPP_

#include <cstdint>
#include <string>
#include <utility>
#include "ffw_robot_manager/battery_model.hpp"
Expand Down