mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Corrects insert
explicitly to supply a shared_ptr
rather than a raw one.
This commit is contained in:
parent
c91a5875b2
commit
bce58683fa
@ -25,7 +25,7 @@ template <typename T> void DiskImageHolder<T>::flush_tracks() {
|
||||
using TrackMap = std::map<Track::Address, std::shared_ptr<Track>>;
|
||||
std::shared_ptr<TrackMap> track_copies(new TrackMap);
|
||||
for(auto &address : unwritten_tracks_) {
|
||||
track_copies->insert(std::make_pair(address, cached_tracks_[address]->clone()));
|
||||
track_copies->insert(std::make_pair(address, std::shared_ptr<Track>(cached_tracks_[address]->clone())));
|
||||
}
|
||||
unwritten_tracks_.clear();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user