Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
06f3abe2
Commit
06f3abe2
authored
Jan 12, 2016
by
vitaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return early from ArgMap::find
parent
50f14f22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
format.h
format.h
+5
-5
No files found.
format.h
View file @
06f3abe2
...
@@ -1681,13 +1681,13 @@ class ArgMap {
...
@@ -1681,13 +1681,13 @@ class ArgMap {
FMT_API
void
init
(
const
ArgList
&
args
);
FMT_API
void
init
(
const
ArgList
&
args
);
const
internal
::
Arg
*
find
(
const
fmt
::
BasicStringRef
<
Char
>
&
name
)
const
{
const
internal
::
Arg
*
find
(
const
fmt
::
BasicStringRef
<
Char
>
&
name
)
const
{
typename
MapType
::
const_iterator
it
=
map_
.
begin
();
// The list is unsorted, so just return the first matching name.
// the list is unsorted, so just return the first matching name.
for
(
typename
MapType
::
const_iterator
it
=
map_
.
begin
(),
end
=
map_
.
end
();
for
(;
it
!=
map_
.
end
()
;
++
it
)
{
it
!=
end
;
++
it
)
{
if
(
it
->
first
==
name
)
if
(
it
->
first
==
name
)
break
;
return
&
it
->
second
;
}
}
return
it
!=
map_
.
end
()
?
&
it
->
second
:
0
;
return
0
;
}
}
};
};
...
...
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