Skip to content

Commit

Permalink
Merge pull request #670 from ut-issl/hotfix/add-const-powerport-getter
Browse files Browse the repository at this point in the history
[hotfix] Add const getter of PowerPort in PowerControlUnit
  • Loading branch information
conjikidow authored Aug 22, 2024
2 parents a7f93b0 + 53be057 commit 0f09a51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/real/power/power_control_unit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class PowerControlUnit : public Component, public ILoggable {
* @brief Return power port information
* @param port_id: Power port ID
*/
inline PowerPort* GetPowerPort(const int port_id) { return power_ports_[port_id]; };
inline PowerPort* GetPowerPort(const int port_id) { return power_ports_.at(port_id); };
inline const PowerPort* GetPowerPort(const int port_id) const { return power_ports_.at(port_id); };

// Port control functions
/**
Expand Down

0 comments on commit 0f09a51

Please sign in to comment.