summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-28 18:49:02 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-28 18:49:02 +0000
commit3c845a534e67829227b01b246ac66de7c7b55de3 (patch)
tree593d2592432de513ace434c7544f98afd8237179 /crawl-ref/source/libutil.cc
parent95259b9b62799b2e5fe00f8833c28b8a96879e49 (diff)
downloadcrawl-ref-3c845a534e67829227b01b246ac66de7c7b55de3.tar.gz
crawl-ref-3c845a534e67829227b01b246ac66de7c7b55de3.zip
Fixed bad messages when uniques are poisoned by toxic radiance.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2927 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc71
1 files changed, 0 insertions, 71 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index d94ba252a8..25e705a0ec 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -564,77 +564,6 @@ int snprintf( char *str, size_t size, const char *format, ... )
#endif
-//////////////////////////////////////////////////////////////////////////
-// named_thing_collection
-
-named_thing_collection::named_thing_collection()
- : names(), nnames(0u)
-{
-}
-
-void named_thing_collection::add_thing(const std::string &name)
-{
- names[name]++;
- nnames++;
-}
-
-size_t named_thing_collection::size() const
-{
- return (nnames);
-}
-
-bool named_thing_collection::empty() const
-{
- return (!nnames);
-}
-
-std::string named_thing_collection::describe(
- description_level_type desc,
- const char **plural_qualifiers,
- const char **no_qualifier_suffixes) const
-{
- if (empty())
- return ("");
-
- std::ostringstream out;
- for (name_count_map::const_iterator i = names.begin();
- i != names.end(); )
- {
- const std::pair<std::string, int> &curr(*i);
- if (i != names.begin())
- {
- ++i;
- out << (i == names.end()? " and " : ", ");
- }
- else
- ++i;
-
- const std::string name =
- curr.second > 1? pluralise(curr.first, plural_qualifiers,
- no_qualifier_suffixes)
- : curr.first;
- out << apply_description(desc, name, curr.second);
-
- switch (desc)
- {
- case DESC_CAP_A:
- desc = DESC_NOCAP_A;
- break;
- case DESC_CAP_THE:
- desc = DESC_NOCAP_THE;
- break;
- case DESC_CAP_YOUR: case DESC_NOCAP_YOUR:
- desc = DESC_PLAIN;
- break;
- default:
- break;
- }
- }
- return (out.str());
-}
-
-/////////////////////////////////////////////////////////////////////////
-
///////////////////////////////////////////////////////////////////////
// Pattern matching