Renamed YAML type checking function
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Bloom::DebugServer::Gdb
|
|||||||
: DebugServerConfig(debugServerConfig)
|
: DebugServerConfig(debugServerConfig)
|
||||||
{
|
{
|
||||||
if (debugServerConfig.debugServerNode["ipAddress"]) {
|
if (debugServerConfig.debugServerNode["ipAddress"]) {
|
||||||
if (!YamlUtilities::isType<std::string>(debugServerConfig.debugServerNode["ipAddress"])) {
|
if (!YamlUtilities::isCastable<std::string>(debugServerConfig.debugServerNode["ipAddress"])) {
|
||||||
Logger::error(
|
Logger::error(
|
||||||
"Invalid GDB debug server config parameter ('ipAddress') provided - must be a string. The "
|
"Invalid GDB debug server config parameter ('ipAddress') provided - must be a string. The "
|
||||||
"parameter will be ignored."
|
"parameter will be ignored."
|
||||||
@@ -20,7 +20,7 @@ namespace Bloom::DebugServer::Gdb
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debugServerConfig.debugServerNode["port"]) {
|
if (debugServerConfig.debugServerNode["port"]) {
|
||||||
if (YamlUtilities::isType<std::uint16_t>(debugServerConfig.debugServerNode["port"])) {
|
if (YamlUtilities::isCastable<std::uint16_t>(debugServerConfig.debugServerNode["port"])) {
|
||||||
this->listeningPortNumber = debugServerConfig.debugServerNode["port"].as<std::uint16_t>();
|
this->listeningPortNumber = debugServerConfig.debugServerNode["port"].as<std::uint16_t>();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Bloom
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
static bool isType(const YAML::Node& node) {
|
static bool isCastable(const YAML::Node& node) {
|
||||||
try {
|
try {
|
||||||
node.as<Type>();
|
node.as<Type>();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user