Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Sep 6, 2024
1 parent 20bbc25 commit ffc3d93
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions include/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

namespace OpenShock::Convert {
bool ToInt8(std::string_view str, int8_t& val);
bool ToUInt8(std::string_view str, uint8_t& val);
bool ToUint8(std::string_view str, uint8_t& val);
bool ToInt16(std::string_view str, int16_t& val);
bool ToUInt16(std::string_view str, uint16_t& val);
bool ToUint16(std::string_view str, uint16_t& val);
bool ToInt32(std::string_view str, int32_t& val);
bool ToUInt32(std::string_view str, uint32_t& val);
bool ToUint32(std::string_view str, uint32_t& val);
bool ToInt64(std::string_view str, int64_t& val);
bool ToUInt64(std::string_view str, uint64_t& val);
bool ToUint64(std::string_view str, uint64_t& val);
bool ToBool(std::string_view str, bool& val);
} // namespace OpenShock::Convert
8 changes: 4 additions & 4 deletions src/Convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@ using namespace OpenShock;
bool Convert::ToInt8(std::string_view str, int8_t& val) {
return spanToST(str, val);
}
bool Convert::ToUInt8(std::string_view str, uint8_t& val) {
bool Convert::ToUint8(std::string_view str, uint8_t& val) {
return spanToUT(str, val);
}
bool Convert::ToInt16(std::string_view str, int16_t& val) {
return spanToST(str, val);
}
bool Convert::ToUInt16(std::string_view str, uint16_t& val) {
bool Convert::ToUint16(std::string_view str, uint16_t& val) {
return spanToUT(str, val);
}
bool Convert::ToInt32(std::string_view str, int32_t& val) {
return spanToST(str, val);
}
bool Convert::ToUInt32(std::string_view str, uint32_t& val) {
bool Convert::ToUint32(std::string_view str, uint32_t& val) {
return spanToUT(str, val);
}
bool Convert::ToInt64(std::string_view str, int64_t& val) {
return spanToST(str, val);
}
bool Convert::ToUInt64(std::string_view str, uint64_t& val) {
bool Convert::ToUint64(std::string_view str, uint64_t& val) {
return spanToUT(str, val);
}
bool Convert::ToBool(std::string_view str, bool& val) {
Expand Down
2 changes: 1 addition & 1 deletion src/serial/SerialInputHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void _handleRfTxPinCommand(std::string_view arg) {
}

uint8_t pin;
if (!OpenShock::Convert::ToUInt8(arg, pin)) {
if (!OpenShock::Convert::ToUint8(arg, pin)) {
SERPR_ERROR("Invalid argument (number invalid or out of range)");
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/IPAddressUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool OpenShock::IPV4AddressFromStringView(IPAddress& ip, std::string_view sv) {
}

std::uint8_t octets[4];
if (!Convert::ToUInt8(parts[0], octets[0]) || !Convert::ToUInt8(parts[1], octets[1]) || !Convert::ToUInt8(parts[2], octets[2]) || !Convert::ToUInt8(parts[3], octets[3])) {
if (!Convert::ToUint8(parts[0], octets[0]) || !Convert::ToUint8(parts[1], octets[1]) || !Convert::ToUint8(parts[2], octets[2]) || !Convert::ToUint8(parts[3], octets[3])) {
return false;
}

Expand Down

0 comments on commit ffc3d93

Please sign in to comment.