TileLayer: use shared_ptr for FrameSpec vector (#6171)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Wed, 26 Jul 2017 18:12:48 +0000 (20:12 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jul 2017 18:12:48 +0000 (20:12 +0200)
commit3e50850260db13ec63ce4ca0e47e7fd7e30ce484
treeeb07ce2418ad29152db2378dd9e75fb873cdafd4
parent9a17b65f26eea5b9d7176e7df205f72ed2ff6c0f
TileLayer: use shared_ptr for FrameSpec vector (#6171)

* TileLayer: use shared_ptr for vector framespec
This reduce memory copy of TileLayer from (4 to 16) * FrameSpec where FrameSpec = (sizeof(int) + 3 * sizeof(ptr)) to int + sizeof(ptr)

Callgrind difference

Before: https://lut.im/RGkiJqQb8T/LeQIEXpAuRzfl7gd.png\ f
After: https://lut.im/bcqmwee1xu/cTwtptY5tRuS9lp0.png

* Fix one push_back to use vector::emplace_back & optimize inclusions
src/client/tile.h
src/mapblock_mesh.cpp
src/nodedef.cpp
src/particles.cpp
src/wieldmesh.cpp