git://developer.intra2net.com
/
bpdyndnsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
20f4aef
)
No need for manual copy. Implemented exception safe copy
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Mon, 31 Jan 2011 10:56:58 +0000 (11:56 +0100)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Mon, 31 Jan 2011 10:56:58 +0000 (11:56 +0100)
src/service.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/service.cpp
b/src/service.cpp
index
58c84cb
..
57071fb
100644
(file)
--- a/
src/service.cpp
+++ b/
src/service.cpp
@@
-146,11
+146,8
@@
Logger::Ptr Service::get_logger() const
*/
void Service::set_last_updates(std::map<time_t,std::string> _last_updates)
{
- LastUpdates.clear();
- for ( std::map<time_t,std::string>::iterator iter = _last_updates.begin(); iter != _last_updates.end(); iter++ )
- {
- LastUpdates.insert(make_pair(iter->first,iter->second));
- }
+ std::map<time_t,std::string> temp = _last_updates;
+ LastUpdates.swap(temp);
}