summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-12 12:36:32 -0400
committerNeil Moore <neil@s-z.org>2014-07-12 12:40:59 -0400
commit241103d554b1ee1b1b426e17fc0dce85f9a3b706 (patch)
treed7b82f1ee0fd5ef6cd8240345509067909125751
parentdc9adda271b63ed5362ef1a2dda5c0d214051fc6 (diff)
downloadcrawl-ref-241103d554b1ee1b1b426e17fc0dce85f9a3b706.tar.gz
crawl-ref-241103d554b1ee1b1b426e17fc0dce85f9a3b706.zip
Add a useful predicate for find_earliest_match.
-rw-r--r--crawl-ref/source/libutil.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index b5d29b6b68..eabd421c35 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -178,6 +178,8 @@ string comma_separated_line(Z start, Z end, const string &andc = " and ",
string unwrap_desc(string desc);
+template<class T> bool _always_true(T) { return true; }
+
/**
* Find the enumerator e between begin and end that satisfies pred(e) and
* whose name, as given by namefunc(e), has the earliest occurrence of the