projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3dcaf5
)
Avoid copy of work list argument: make it const ref
author
David Neto
<dneto@google.com>
Fri, 10 Jun 2016 10:41:20 +0000
(06:41 -0400)
committer
David Neto
<dneto@google.com>
Fri, 10 Jun 2016 10:41:38 +0000
(06:41 -0400)
source/validate_cfg.cpp
patch
|
blob
|
history
diff --git
a/source/validate_cfg.cpp
b/source/validate_cfg.cpp
index
ef41db0
..
136cbdc
100644
(file)
--- a/
source/validate_cfg.cpp
+++ b/
source/validate_cfg.cpp
@@
-74,8
+74,8
@@
struct block_info {
/// @param[in] id The ID of the block being checked
/// @return true if the edge work_list.back().block->get_id() => id is a
/// back-edge
-bool FindInWorkList(
vector<block_info>
work_list, uint32_t id) {
- for (auto b : work_list) {
+bool FindInWorkList(
const vector<block_info>&
work_list, uint32_t id) {
+ for (
const
auto b : work_list) {
if (b.block->get_id() == id) return true;
}
return false;