예제 #1
0
파일: mru.cpp 프로젝트: Gpower2/Aegisub
std::string const& MRUManager::GetEntry(std::string const& key, const size_t entry) {
	const MRUManager::MRUListMap *const map = Get(key);

	if (entry >= map->size())
		throw MRUErrorIndexOutOfRange("Requested element index is out of range.");

	return *next(map->begin(), entry);
}
예제 #2
0
파일: mru.cpp 프로젝트: jeeb/aegisub
std::string const& MRUManager::GetEntry(const std::string &key, size_t entry) {
	const MRUManager::MRUListMap *map = Get(key);

	if (entry > map->size())
		throw MRUErrorIndexOutOfRange("Requested element index is out of range.");

	MRUListMap::const_iterator index = map->begin();
	advance(index, entry);
	return *index;
}