Corrected return type of getters in TDF structs
This commit is contained in:
@@ -67,9 +67,7 @@ namespace Targets::TargetDescription
|
|||||||
: std::nullopt;
|
: std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::reference_wrapper<const MemorySegmentSection>> getSection(
|
const MemorySegmentSection& getSection(std::string_view keyStr) const {
|
||||||
std::string_view keyStr
|
|
||||||
) const {
|
|
||||||
const auto propertyGroup = this->tryGetSection(keyStr);
|
const auto propertyGroup = this->tryGetSection(keyStr);
|
||||||
if (!propertyGroup.has_value()) {
|
if (!propertyGroup.has_value()) {
|
||||||
throw Exceptions::InvalidTargetDescriptionDataException(
|
throw Exceptions::InvalidTargetDescriptionDataException(
|
||||||
|
|||||||
@@ -62,9 +62,7 @@ namespace Targets::TargetDescription
|
|||||||
return this->tryGetSubSection(Services::StringService::split(keyStr, '.'));
|
return this->tryGetSubSection(Services::StringService::split(keyStr, '.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::reference_wrapper<const MemorySegmentSection>> getSubSection(
|
const MemorySegmentSection& getSubSection(std::string_view keyStr) const {
|
||||||
std::string_view keyStr
|
|
||||||
) const {
|
|
||||||
const auto propertyGroup = this->tryGetSubSection(keyStr);
|
const auto propertyGroup = this->tryGetSubSection(keyStr);
|
||||||
if (!propertyGroup.has_value()) {
|
if (!propertyGroup.has_value()) {
|
||||||
throw Exceptions::InvalidTargetDescriptionDataException(
|
throw Exceptions::InvalidTargetDescriptionDataException(
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace Targets::TargetDescription
|
|||||||
return this->tryGetSubgroup(Services::StringService::split(keyStr, '.'));
|
return this->tryGetSubgroup(Services::StringService::split(keyStr, '.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::reference_wrapper<const PropertyGroup>> getSubgroup(std::string_view keyStr) const {
|
const PropertyGroup& getSubgroup(std::string_view keyStr) const {
|
||||||
const auto propertyGroup = this->tryGetSubgroup(keyStr);
|
const auto propertyGroup = this->tryGetSubgroup(keyStr);
|
||||||
if (!propertyGroup.has_value()) {
|
if (!propertyGroup.has_value()) {
|
||||||
throw Exceptions::InvalidTargetDescriptionDataException(
|
throw Exceptions::InvalidTargetDescriptionDataException(
|
||||||
|
|||||||
Reference in New Issue
Block a user