1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-07 07:50:32 +00:00

fixing unreachable code

This commit is contained in:
Carles Fernandez 2015-05-12 23:45:56 +02:00
parent ca8cb826ac
commit 5d6a661842

View File

@ -68,15 +68,17 @@ public:
std::map<int,Data> get_map_copy() std::map<int,Data> get_map_copy()
{ {
boost::mutex::scoped_lock lock(the_mutex); boost::mutex::scoped_lock lock(the_mutex);
return the_map; std::map<int,Data> map_aux = the_map;
lock.unlock(); lock.unlock();
return map_aux;
} }
int size() size_t size()
{ {
boost::mutex::scoped_lock lock(the_mutex); boost::mutex::scoped_lock lock(the_mutex);
return the_map.size(); size_t size_ = the_map.size();
lock.unlock(); lock.unlock();
return size_;
} }
bool read(int key, Data& p_data) bool read(int key, Data& p_data)