Tidying
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user