summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LB_Location_Equal_To.inl
blob: 94b22dfb46f0af0f3d67d6c53c90110bcd7bd388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// -*- C++ -*-

ACE_INLINE int
TAO_LB_Location_Equal_To::operator () (
  const LoadBalancing::Location &lhs,
  const LoadBalancing::Location &rhs)
{
  CORBA::ULong lhs_len = lhs.length ();
  CORBA::ULong rhs_len = rhs.length ();

  if (lhs_len != rhs_len)
    return 0;

  for (CORBA::ULong i = 0; i < lhs_len; ++i)
    if (ACE_OS::strcmp (lhs[i].id.in (), rhs[i].id.in ()) != 0
        || ACE_OS::strcmp (lhs[i].kind.in (), rhs[i].kind.in ()) != 0)
      return 0;

  return 1;
}