This commit is contained in:
Nav
2024-02-25 16:41:57 +00:00
parent 44b01ecd84
commit 7918b7c9f7
3 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ namespace Targets::TargetDescription
{
std::string key;
std::map<std::string, Property, std::less<void>> propertiesByKey;
std::map<std::string, PropertyGroup, std::less<void>> subgroupByKey;
std::map<std::string, PropertyGroup, std::less<void>> subgroupsByKey;
PropertyGroup(
const std::string& key,
@@ -37,15 +37,15 @@ namespace Targets::TargetDescription
)
: key(key)
, propertiesByKey(propertiesByKey)
, subgroupByKey(subgroupByKey)
, subgroupsByKey(subgroupByKey)
{}
template <typename KeysType>
requires
std::ranges::sized_range<KeysType>
std::optional<std::reference_wrapper<const PropertyGroup>> tryGetSubgroup(KeysType keys) const {
auto firstSubgroupIt = this->subgroupByKey.find(*(keys.begin()));
if (firstSubgroupIt == this->subgroupByKey.end()) {
auto firstSubgroupIt = this->subgroupsByKey.find(*(keys.begin()));
if (firstSubgroupIt == this->subgroupsByKey.end()) {
return std::nullopt;
}

View File

@@ -234,7 +234,7 @@ namespace Targets::TargetDescription
element = element.nextSiblingElement("property-group")
) {
auto subgroup = TargetDescriptionFile::propertyGroupFromXml(element);
output.subgroupByKey.insert(std::pair(subgroup.key, std::move(subgroup)));
output.subgroupsByKey.insert(std::pair(subgroup.key, std::move(subgroup)));
}
return output;

View File

@@ -36,7 +36,7 @@ namespace Targets
TargetMemoryAddressRange(TargetMemoryAddress startAddress, TargetMemoryAddress endAddress)
: startAddress(startAddress)
, endAddress(endAddress)
{};
{}
bool operator == (const TargetMemoryAddressRange& rhs) const {
return this->startAddress == rhs.startAddress && this->endAddress == rhs.endAddress;
@@ -107,7 +107,7 @@ namespace Targets
, addressRange(addressRange)
, access(access)
, pageSize(pageSize)
{};
{}
bool operator == (const TargetMemoryDescriptor& rhs) const {
return this->type == rhs.type && this->addressRange == rhs.addressRange;