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

View File

@@ -234,7 +234,7 @@ namespace Targets::TargetDescription
element = element.nextSiblingElement("property-group") element = element.nextSiblingElement("property-group")
) { ) {
auto subgroup = TargetDescriptionFile::propertyGroupFromXml(element); 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; return output;

View File

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