コード例 #1
0
ファイル: stackops.cpp プロジェクト: vsekhar/vpush
double yank_code(Protein &p) {
	if(top<int>(p) < 0) return 0;
	int index = pop<int>(p);
	std::size_t count;
	try {
		item<T> i = get_nth_item(stack<T>(p), (unsigned)index, erase);
		put_item(i, stack<T>(p));
		count = i.container.size();
	}
	catch(const detail::stack_underflow&) {
		push<int>(p, index);
		return 0;
	}
	return count;
}
コード例 #2
0
ファイル: LightManager.cpp プロジェクト: qqdiguo/MuseOpenIG
			Light* LightManager::GetLight(size_t index)
			{
				return get_nth_item(m_Lights, index);
			}