Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
40d04206
Unverified
Commit
40d04206
authored
Jan 31, 2020
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[clang-tidy] convert several loops to const auto&
Found with performance-for-range-copy Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
bc6eca21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
InputPlugin.cxx
src/input/InputPlugin.cxx
+1
-1
ls.cxx
src/ls.cxx
+2
-2
StorageState.cxx
src/storage/StorageState.cxx
+1
-1
No files found.
src/input/InputPlugin.cxx
View file @
40d04206
...
...
@@ -33,7 +33,7 @@ InputPlugin::SupportsUri(const char *uri) const noexcept
if
(
StringStartsWithIgnoreCase
(
uri
,
*
i
))
return
true
;
}
else
{
for
(
auto
schema
:
protocols
())
{
for
(
const
auto
&
schema
:
protocols
())
{
if
(
StringStartsWithIgnoreCase
(
uri
,
schema
.
c_str
())){
return
true
;
}
...
...
src/ls.cxx
View file @
40d04206
...
...
@@ -39,7 +39,7 @@ void print_supported_uri_schemes_to_fp(FILE *fp)
protocols
.
emplace
(
uri
);
});
for
(
auto
protocol
:
protocols
)
{
for
(
const
auto
&
protocol
:
protocols
)
{
fprintf
(
fp
,
" %s"
,
protocol
.
c_str
());
}
fprintf
(
fp
,
"
\n
"
);
...
...
@@ -54,7 +54,7 @@ print_supported_uri_schemes(Response &r)
protocols
.
emplace
(
uri
);
});
for
(
auto
protocol
:
protocols
)
{
for
(
const
auto
&
protocol
:
protocols
)
{
r
.
Format
(
"handler: %s
\n
"
,
protocol
.
c_str
());
}
}
...
...
src/storage/StorageState.cxx
View file @
40d04206
...
...
@@ -139,7 +139,7 @@ storage_state_get_hash(const Instance &instance)
boost
::
crc_32_type
result
;
for
(
auto
mount
:
mounts
)
{
for
(
const
auto
&
mount
:
mounts
)
{
result
.
process_bytes
(
mount
.
c_str
(),
mount
.
length
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment