summaryrefslogtreecommitdiff
path: root/src/farmesh.cpp
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-12-20 21:19:49 +0400
committerkwolekr <kwolekr@minetest.net>2013-03-11 19:08:39 -0400
commit6a1670dbc31cc0e44178bbd9ad34ff0d5981a060 (patch)
treece32cd4be20e9be30367f2ad25d9dae6a0482898 /src/farmesh.cpp
parente204bedf1d781e43b8caa334a99319efc5b7ce46 (diff)
downloadminetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.gz
minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.bz2
minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.zip
Migrate to STL containers/algorithms.
Diffstat (limited to 'src/farmesh.cpp')
-rw-r--r--src/farmesh.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/farmesh.cpp b/src/farmesh.cpp
index 443e2b3bf..ecf01ee07 100644
--- a/src/farmesh.cpp
+++ b/src/farmesh.cpp
@@ -112,13 +112,13 @@ struct HeightPoint
float have_sand;
float tree_amount;
};
-core::map<v2s16, HeightPoint> g_heights;
+std::map<v2s16, HeightPoint> g_heights;
HeightPoint ground_height(u64 seed, v2s16 p2d)
{
- core::map<v2s16, HeightPoint>::Node *n = g_heights.find(p2d);
- if(n)
- return n->getValue();
+ std::map<v2s16, HeightPoint>::iterator n = g_heights.find(p2d);
+ if(n != g_heights.end())
+ return n->second;
HeightPoint hp;
s16 level = Mapgen::find_ground_level_from_noise(seed, p2d, 3);
hp.gh = (level-4)*BS;