示例#1
0
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
			Light* LightManager::GetLight(size_t index)
			{
				return get_nth_item(m_Lights, index);
			}