<commit_before>//
//  DiskImageImplementation.hpp
//  Clock Signal
//
//  Created by <NAME> on 22/09/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

template <typename T> int DiskImageHolder<T>::get_head_position_count() {
	return disk_image_.get_head_position_count();
}

template <typename T> int DiskImageHolder<T>::get_head_count() {
	return disk_image_.get_head_count();
}

template <typename T> bool DiskImageHolder<T>::get_is_read_only() {
	return disk_image_.get_is_read_only();
}

template <typename T> void DiskImageHolder<T>::flush_tracks() {
	if(!unwritten_tracks_.empty()) {
		if(!update_queue_) update_queue_.reset(new Concurrency::AsyncTaskQueue);

		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()));
		}<commit_msg>Corrects `insert` explicitly to supply a `shared_ptr` rather than a raw one.<commit_after>//
//  DiskImageImplementation.hpp
//  Clock Signal
//
//  Created by <NAME> on 22/09/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

template <typename T> int DiskImageHolder<T>::get_head_position_count() {
	return disk_image_.get_head_position_count();
}

template <typename T> int DiskImageHolder<T>::get_head_count() {
	return disk_image_.get_head_count();
}

template <typename T> bool DiskImageHolder<T>::get_is_read_only() {
	return disk_image_.get_is_read_only();
}

template <typename T> void DiskImageHolder<T>::flush_tracks() {
	if(!unwritten_tracks_.empty()) {
		if(!update_queue_) update_queue_.reset(new Concurrency::AsyncTaskQueue);

		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, std::shared_ptr<Track>(cached_tracks_[address]->clone())));
		}
{'fraction_non_alphanumeric': 0.14445007602635582, 'fraction_numerical': 0.012164216928535226, 'mean_word_length': 6.338289962825279, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3742941', 'n_tokens_mistral': 705, 'n_tokens_neox': 644, 'n_words': 127}