mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Merge pull request #270 from TomHarte/TrackCloning
Corrects `insert` explicitly to supply a `shared_ptr` rather than a raw one.
This commit is contained in:
commit
3550196bed
@ -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