Files
BloomPatched/src/Targets/TargetPinDescriptor.cpp
Nav f0b7f3193c Corrected string->int conversion bug in TargetPinDescriptor.
The `numericPosition` member should really be removed. Will revisit later.
2024-10-27 00:28:41 +01:00

20 lines
492 B
C++

#include "TargetPinDescriptor.hpp"
#include "src/Services/StringService.hpp"
namespace Targets
{
TargetPinDescriptor::TargetPinDescriptor(
const std::string& position,
const std::optional<std::string>& padKey
)
: position(position)
, numericPosition(
Services::StringService::isNumeric(this->position)
? Services::StringService::toUint16(this->position, 10)
: 0
)
, padKey(padKey)
{}
}