diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-08-28 01:37:07 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-08-28 01:37:07 +0200 |
commit | 02ef691263a4ca800b01530e73f4d2ddd9cce23b (patch) | |
tree | e051a95a1aaedbba92e52fe34ded31e4bd1ed206 /crawl-ref/source/view.cc | |
parent | 5bb725201a068fa211b165a8b6c1e1694d335d7e (diff) | |
download | crawl-ref-02ef691263a4ca800b01530e73f4d2ddd9cce23b.tar.gz crawl-ref-02ef691263a4ca800b01530e73f4d2ddd9cce23b.zip |
Use unique_ptr instead of auto_ptr (emulated for non-C++11).
This stops the tons of warnings, while allowing building for both old
and new C++ standards. And if we wanted to use shared_ptr or something,
now we can without being ambiguous.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 13f69c62e8..b9cfb8f4e3 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -403,9 +403,9 @@ static const FixedArray<uint8_t, GXM, GYM>& _tile_difficulties(bool random) return cache; } -static auto_ptr<FixedArray<bool, GXM, GYM> > _tile_detectability() +static unique_ptr<FixedArray<bool, GXM, GYM> > _tile_detectability() { - auto_ptr<FixedArray<bool, GXM, GYM> > map(new FixedArray<bool, GXM, GYM>); + unique_ptr<FixedArray<bool, GXM, GYM> > map(new FixedArray<bool, GXM, GYM>); vector<coord_def> flood_from; @@ -482,7 +482,7 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, const FixedArray<uint8_t, GXM, GYM>& difficulty = _tile_difficulties(!deterministic); - auto_ptr<FixedArray<bool, GXM, GYM> > detectable; + unique_ptr<FixedArray<bool, GXM, GYM> > detectable; if (!deterministic) detectable = _tile_detectability(); |