OpenTTD
Public Member Functions
StringCompare Struct Reference

Comparator for strings. More...

#include <string_compare_type.hpp>

Public Member Functions

bool operator() (const char *a, const char *b) const
 Compare two strings. More...
 
bool operator() (const char *a, const char *b) const
 Compare a to b using strcmp. More...
 

Detailed Description

Comparator for strings.

Simple string comparator using strcmp as implementation.

Definition at line 16 of file string_compare_type.hpp.

Member Function Documentation

◆ operator()() [1/2]

bool StringCompare::operator() ( const char *  a,
const char *  b 
) const
inline

Compare two strings.

Parameters
aThe first string.
bThe second string.
Returns
True is the first string is deemed "lower" than the second string.

Definition at line 23 of file string_compare_type.hpp.

◆ operator()() [2/2]

bool StringCompare::operator() ( const char *  a,
const char *  b 
) const
inline

Compare a to b using strcmp.

Parameters
astring to compare.
bstring to compare.
Returns
whether a is less than b.

Definition at line 132 of file depend.cpp.


The documentation for this struct was generated from the following files: