1/**
2 * @file symbol_functors.cpp
3 * Functors for symbol/sample comparison
4 *
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
7 *
8 * @author Philippe Elie
9 * @author John Levon
10 */
11
12#include "symbol_functors.h"
13
14bool less_symbol::operator()(symbol_entry const & lhs,
15			     symbol_entry const & rhs) const
16{
17	if (lhs.image_name != rhs.image_name)
18		return lhs.image_name < rhs.image_name;
19
20	if (lhs.app_name != rhs.app_name)
21		return lhs.app_name < rhs.app_name;
22
23	if (lhs.name != rhs.name)
24		return lhs.name < rhs.name;
25
26	if (lhs.sample.vma != rhs.sample.vma)
27		return lhs.sample.vma < rhs.sample.vma;
28
29	return lhs.size < rhs.size;
30}
31