コード例 #1
0
bool ActivityManager::ActivityNameComp::operator()(
	const Activity& act1, const Activity& act2) const
{
	const std::string& act1Name = act1.GetName();
	const std::string& act2Name = act2.GetName();

	if (act1Name != act2Name) {
		return act1Name < act2Name;
	} else {
		return act1.GetCreator() < act2.GetCreator();
	}
}
コード例 #2
0
bool ActivityManager::ActivityNameComp::operator()(
	const Activity& act, const ActivityKey& key) const
{
	return ActivityKey(act.GetName(), act.GetCreator()) < key;
}