From a0d48b01861f3745455c731078bc2b15187b1050 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 25 Jan 2007 10:43:02 +0000 Subject: Removed USE_NEW_RANDOM, USE_MACROS. Removed DOS_TERM, PLAIN_TERM special casery - all platforms get PLAIN_TERM. Better end-of-greedy-explore reporting for items on traps (Erik). Cleaned up find_travel_pos - moved guts of travel pathfinding to travel_pathfind class. Miscellaneous other stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@882 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/libutil.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/libutil.h') diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h index be30ec5ebd..5ad02e504e 100644 --- a/crawl-ref/source/libutil.h +++ b/crawl-ref/source/libutil.h @@ -80,8 +80,10 @@ inline std::string lowercase_first(std::string s) return (s); } -template -std::string comma_separated_line(Z start, Z end) +template +std::string comma_separated_line(Z start, Z end, + const std::string &andc = " and ", + const std::string &comma = ", ") { std::string text; for (Z i = start; i != end; ++i) @@ -89,9 +91,9 @@ std::string comma_separated_line(Z start, Z end) if (i != start) { if (i + 1 != end) - text += ", "; + text += comma; else - text += " and "; + text += andc; } text += *i; -- cgit v1.2.3-54-g00ecf