Skip to content

Commit 8a644ea

Browse files
committed
const return, static casting
1 parent 8a7b85d commit 8a644ea

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ui/dive_tree_view.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ class DiveFilterModel : public QSortFilterProxyModel
5454
DiveFilterModel(const Dive::CommandHierarchy &command_hierarchy, QObject *parent = nullptr);
5555
void SetMode(FilterMode filter_mode);
5656
void CollectGfxrDrawCallIndices(const QModelIndex &parent_index = QModelIndex());
57-
std::vector<uint64_t> GetPm4DrawCallIndices() { return m_pm4_draw_call_indices; }
58-
std::vector<uint64_t> GetGfxrDrawCallIndices() { return m_gfxr_draw_call_indices; }
57+
void AddPm4DrawCallIndex(uint64_t index) const;
58+
const std::vector<uint64_t>& GetPm4DrawCallIndices() { return m_pm4_draw_call_indices; }
59+
const std::vector<uint64_t>& GetGfxrDrawCallIndices() { return m_gfxr_draw_call_indices; }
5960
public slots:
6061
void applyNewFilterMode(FilterMode new_mode);
6162

@@ -66,7 +67,7 @@ public slots:
6667
const Dive::CommandHierarchy &m_command_hierarchy;
6768
FilterMode m_filter_mode = kNone;
6869
mutable std::vector<uint64_t> m_pm4_draw_call_indices;
69-
mutable std::vector<uint64_t> m_gfxr_draw_call_indices;
70+
std::vector<uint64_t> m_gfxr_draw_call_indices;
7071
};
7172

7273
//--------------------------------------------------------------------------------------------------

ui/gfxr_vulkan_command_arguments_tab_view.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void GfxrVulkanCommandArgumentsTabView::OnSelectionChanged(const QModelIndex &in
118118
// Always use the source_index, regardless of whether a proxy was involved.
119119
m_arg_proxy_model->SetTargetParentSourceIndex(source_index);
120120

121-
uint32_t column_count = (uint32_t)m_command_hierarchy_model->columnCount(QModelIndex());
121+
uint32_t column_count = static_cast<uint32_t>(m_command_hierarchy_model->columnCount(QModelIndex()));
122122
for (uint32_t column = 0; column < column_count; ++column)
123123
m_command_hierarchy_view->resizeColumnToContents(column);
124124

0 commit comments

Comments
 (0)