mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Optimize release builds: LTO, -O3, visibility, micro-perf fixes
- CMakeLists.txt: enable LTO for Release, add -O3 and -fvisibility=hidden - scene: addMesh uses std::move, removeMesh takes const shared_ptr& - entity: std::move entity into map instead of copy - clouds: cosf/sinf instead of cos/sin (float math, avoids double promotion) - game_screen: reserve trainer spell vector before push_back loop - warden_module/emulator: replace std::endl (121 stream flushes) with '\n'
This commit is contained in:
parent
eacecddfb0
commit
7ab25c63c9
8 changed files with 167 additions and 152 deletions
|
|
@ -6,10 +6,10 @@ namespace wowee {
|
|||
namespace rendering {
|
||||
|
||||
void Scene::addMesh(std::shared_ptr<Mesh> mesh) {
|
||||
meshes.push_back(mesh);
|
||||
meshes.push_back(std::move(mesh));
|
||||
}
|
||||
|
||||
void Scene::removeMesh(std::shared_ptr<Mesh> mesh) {
|
||||
void Scene::removeMesh(const std::shared_ptr<Mesh>& mesh) {
|
||||
auto it = std::find(meshes.begin(), meshes.end(), mesh);
|
||||
if (it != meshes.end()) {
|
||||
meshes.erase(it);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue