Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
17bf6cea
Commit
17bf6cea
authored
Aug 13, 2013
by
Tristan Matthews
Browse files
* #28351: history: use range-based for loops
parent
61e6269b
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/history/history.cpp
View file @
17bf6cea
...
...
@@ -86,9 +86,8 @@ bool History::save()
std
::
ofstream
outfile
(
path_
.
c_str
());
if
(
outfile
.
fail
())
return
false
;
for
(
vector
<
HistoryItem
>::
const_iterator
iter
=
items_
.
begin
();
iter
!=
items_
.
end
();
++
iter
)
outfile
<<
*
iter
<<
std
::
endl
;
for
(
const
auto
&
iter
:
items_
)
outfile
<<
iter
<<
std
::
endl
;
return
true
;
}
...
...
@@ -129,9 +128,8 @@ vector<map<string, string> > History::getSerialized()
{
sfl
::
ScopedLock
lock
(
historyItemsMutex_
);
vector
<
map
<
string
,
string
>
>
result
;
for
(
vector
<
HistoryItem
>::
const_iterator
iter
=
items_
.
begin
();
iter
!=
items_
.
end
();
++
iter
)
result
.
push_back
(
iter
->
toMap
());
for
(
const
auto
&
iter
:
items_
)
result
.
push_back
(
iter
.
toMap
());
return
result
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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