diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-27 16:48:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-27 16:48:09 +0200 |
| commit | 4cf5bb027678717263476e676cd23f881eef1ca1 (patch) | |
| tree | a842d54e82a4998c8b593f86fef858560c10b4d2 /modules/gridmap/grid_map.cpp | |
| parent | cb5a62903f9798da8b12f625cbd5a493f14e41d3 (diff) | |
| parent | cdc411fd54fbafc414b29abb1d50a0ff327f0d89 (diff) | |
| download | redot-engine-4cf5bb027678717263476e676cd23f881eef1ca1.tar.gz | |
Merge pull request #22446 from akien-mga/fix-warnings
Fix various warnings raised by GCC 5
Diffstat (limited to 'modules/gridmap/grid_map.cpp')
| -rw-r--r-- | modules/gridmap/grid_map.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index a480c4183e..a8fdf8cf1f 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -29,37 +29,19 @@ /*************************************************************************/ #include "grid_map.h" -#include "core/message_queue.h" -#include "scene/3d/light.h" -#include "scene/resources/surface_tool.h" -#include "servers/visual_server.h" #include "core/io/marshalls.h" -#include "core/os/os.h" +#include "core/message_queue.h" +#include "scene/3d/light.h" #include "scene/resources/mesh_library.h" +#include "scene/resources/surface_tool.h" #include "scene/scene_string_names.h" +#include "servers/visual_server.h" bool GridMap::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; - /* } else if (name=="cells") { - PoolVector<int> cells = p_value; - int amount=cells.size(); - PoolVector<int>::Read r = cells.read(); - ERR_FAIL_COND_V(amount&1,false); // not even - cell_map.clear(); - for(int i=0;i<amount/3;i++) { - - - IndexKey ik; - ik.key=decode_uint64(&r[i*3]); - Cell cell; - cell.cell=uint32_t(r[i*+1]); - cell_map[ik]=cell; - - } - _recreate_octant_data();*/ if (name == "data") { Dictionary d = p_value; @@ -80,7 +62,9 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) { cell_map[ik] = cell; } } + _recreate_octant_data(); + } else if (name == "baked_meshes") { clear_baked_meshes(); @@ -103,8 +87,9 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) { _recreate_octant_data(); - } else + } else { return false; + } return true; } @@ -1081,8 +1066,6 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe } } - int ofs = 0; - for (Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool> > >::Element *E = surface_map.front(); E; E = E->next()) { Ref<ArrayMesh> mesh; |
