Tidying
This commit is contained in:
@@ -54,7 +54,7 @@ RegisterGroupWidget::RegisterGroupWidget(
|
||||
bodyLayout->setContentsMargins(0, 0,0,0);
|
||||
bodyLayout->setSpacing(0);
|
||||
|
||||
for (auto& descriptor : registerDescriptors) {
|
||||
for (const auto& descriptor : registerDescriptors) {
|
||||
if (!descriptor.name.has_value()) {
|
||||
continue;
|
||||
}
|
||||
@@ -117,14 +117,14 @@ void RegisterGroupWidget::expand() {
|
||||
}
|
||||
|
||||
void RegisterGroupWidget::setAllRegistersVisible(bool visible) {
|
||||
for (auto& registerWidget : this->registerWidgets) {
|
||||
for (const auto& registerWidget : this->registerWidgets) {
|
||||
registerWidget->setVisible(visible);
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterGroupWidget::filterRegisters(const std::string& keyword) {
|
||||
int matchingWidgetCount = 0;
|
||||
for (auto& registerWidget : this->registerWidgets) {
|
||||
for (const auto& registerWidget : this->registerWidgets) {
|
||||
if (keyword.empty()
|
||||
|| (registerWidget->descriptor.name.value().find(keyword) != std::string::npos)
|
||||
) {
|
||||
|
||||
@@ -126,7 +126,7 @@ TargetRegistersPaneWidget::TargetRegistersPaneWidget(
|
||||
void TargetRegistersPaneWidget::filterRegisters(const QString& keyword) {
|
||||
auto stdKeyword = keyword.toLower().toStdString();
|
||||
|
||||
for (auto& registerGroupWidget : this->registerGroupWidgets) {
|
||||
for (const auto& registerGroupWidget : this->registerGroupWidgets) {
|
||||
// If the group name matches the keyword, then don't bother iterating through all the register widgets
|
||||
if (keyword.isEmpty() || registerGroupWidget->name.contains(keyword, Qt::CaseInsensitive)) {
|
||||
registerGroupWidget->setVisible(true);
|
||||
|
||||
Reference in New Issue
Block a user