summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/randart.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-18 10:28:18 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-18 10:28:18 +0000
commit6dc0abe0ba70d87bae5c869eebef43682566c1c3 (patch)
treeba955f16bde7b2093094bc9eb8302071a25d4c3a /crawl-ref/source/randart.cc
parentae3f16ee3946f99b45e226547277a7da12425eff (diff)
downloadcrawl-ref-6dc0abe0ba70d87bae5c869eebef43682566c1c3.tar.gz
crawl-ref-6dc0abe0ba70d87bae5c869eebef43682566c1c3.zip
More strings instead of char*s.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1599 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r--crawl-ref/source/randart.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index c38fe22f99..47d46955a8 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1221,9 +1221,7 @@ std::string randart_name( const item_def &item )
}
else
{
- char st_p[ITEMNAME_SIZE];
-
- make_name(random_int(), false, st_p);
+ const std::string st_p = make_name(random_int(), false);
result += item_base_name(item);
if (one_chance_in(3))
@@ -1299,9 +1297,7 @@ std::string randart_armour_name( const item_def &item )
}
else
{
- char st_p[ITEMNAME_SIZE];
-
- make_name(random_int(), false, st_p);
+ const std::string st_p = make_name(random_int(), false);
result += item_base_name(item);
if (one_chance_in(3))
{
@@ -1334,9 +1330,6 @@ std::string randart_jewellery_name( const item_def &item )
: unrand->unid_name);
}
- char st_p[ITEMNAME_SIZE];
-
- // long seed = aclass + adam * (aplus % 100) + atype * aplus2;
const long seed = calc_seed( item );
push_rng_state();
seed_rng( seed );
@@ -1385,8 +1378,7 @@ std::string randart_jewellery_name( const item_def &item )
}
else
{
- make_name(random_int(), false, st_p);
-
+ const std::string st_p = make_name(random_int(), false);
result += (jewellery_is_amulet(item) ? "amulet" : "ring");
if (one_chance_in(3))