Remove unused functions.
authoronkrot <vob999@bk.ru>
Sat, 15 Aug 2015 19:25:27 +0000 (00:25 +0500)
committerLoic Blot <loic.blot@unix-experience.fr>
Sun, 16 Aug 2015 12:29:33 +0000 (14:29 +0200)
src/content_mapnode.cpp
src/content_mapnode.h
src/mapgen.cpp
src/mapgen.h
src/unittest/test_mapnode.cpp

index 5e2a5c816e3361838153a43ca417dd5cc09310c2..3a4a4652a69ac53a70e5e9b624b4f9ee4b765b6e 100644 (file)
@@ -233,16 +233,3 @@ std::string content_mapnode_get_new_name(const std::string &oldname)
 {
        return newnamegetter.get(oldname);
 }
-
-content_t legacy_get_id(const std::string &oldname, INodeDefManager *ndef)
-{
-       std::string newname = content_mapnode_get_new_name(oldname);
-       if(newname == "")
-               return CONTENT_IGNORE;
-       content_t id;
-       bool found = ndef->getId(newname, id);
-       if(!found)
-               return CONTENT_IGNORE;
-       return id;
-}
-
index 5c9c0b66dd33264bd53cf92d2bb83051d9e342bd..5d68afe594b5ca2e23c52a358acc205bcd6f16da 100644 (file)
@@ -37,8 +37,5 @@ void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);
 // Convert "CONTENT_STONE"-style names to dynamic ids
 std::string content_mapnode_get_new_name(const std::string &oldname);
 class INodeDefManager;
-content_t legacy_get_id(const std::string &oldname, INodeDefManager *ndef);
-#define LEGN(ndef, oldname) legacy_get_id(oldname, ndef)
 
 #endif
-
index 1843e953da70f1e3e878f4360fec5995f19d986a..f8e9477c52bb5f700f318d62b4f9c2473664f0f1 100644 (file)
@@ -342,30 +342,6 @@ void Mapgen::spreadLight(v3s16 nmin, v3s16 nmax)
 
 
 
-void Mapgen::calcLightingOld(v3s16 nmin, v3s16 nmax)
-{
-       enum LightBank banks[2] = {LIGHTBANK_DAY, LIGHTBANK_NIGHT};
-       VoxelArea a(nmin, nmax);
-       bool block_is_underground = (water_level > nmax.Y);
-       bool sunlight = !block_is_underground;
-
-       ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG);
-
-       for (int i = 0; i < 2; i++) {
-               enum LightBank bank = banks[i];
-               std::set<v3s16> light_sources;
-               std::map<v3s16, u8> unlight_from;
-
-               voxalgo::clearLightAndCollectSources(*vm, a, bank, ndef,
-                       light_sources, unlight_from);
-               voxalgo::propagateSunlight(*vm, a, sunlight, light_sources, ndef);
-
-               vm->unspreadLight(bank, unlight_from, light_sources, ndef);
-               vm->spreadLight(bank, light_sources, ndef);
-       }
-}
-
-
 ///////////////////////////////////////////////////////////////////////////////
 
 GenerateNotifier::GenerateNotifier()
index b0758ba417ba809d0e0f4b724a3f382a302d8ae9..46328ba92f02a8ab432d852f81888cc8c0fba5c3 100644 (file)
@@ -179,8 +179,6 @@ public:
        void propagateSunlight(v3s16 nmin, v3s16 nmax);
        void spreadLight(v3s16 nmin, v3s16 nmax);
 
-       void calcLightingOld(v3s16 nmin, v3s16 nmax);
-
        virtual void makeChunk(BlockMakeData *data) {}
        virtual int getGroundLevelAtPoint(v2s16 p) { return 0; }
 };
index fc1a94916a26de0814850d7e485fba5ea40448fb..9ecc2f82d773f9d3a26ca6dbd6ea5dec844b2206 100644 (file)
@@ -53,6 +53,4 @@ void TestMapNode::testNodeProperties(INodeDefManager *nodedef)
        // Transparency
        n.setContent(CONTENT_AIR);
        UASSERT(nodedef->get(n).light_propagates == true);
-       n.setContent(LEGN(nodedef, "CONTENT_STONE"));
-       UASSERT(nodedef->get(n).light_propagates == false);
 }