Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CatCompare Class Reference

Public Member Functions

bool operator() (const Cargo &a, const Cargo &b)
 

Detailed Description

Definition at line 8328 of file unit_generic.cpp.

Member Function Documentation

bool CatCompare::operator() ( const Cargo a,
const Cargo b 
)
inline

Definition at line 8331 of file unit_generic.cpp.

References Cargo::GetCategory().

8332  {
8333  std::string::const_iterator aiter = a.GetCategory().begin();
8334  std::string::const_iterator aend = a.GetCategory().end();
8335  std::string::const_iterator biter = b.GetCategory().begin();
8336  std::string::const_iterator bend = b.GetCategory().end();
8337  for (; aiter != aend && biter != bend; ++aiter, ++biter) {
8338  char achar = *aiter;
8339  char bchar = *biter;
8340  if (achar < bchar)
8341  return true;
8342  if (achar > bchar)
8343  return false;
8344  }
8345  return false;
8346  }

The documentation for this class was generated from the following file: