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