1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Modernize client code (#6250)

* Various code style fixes
* Use range based for loops
* Use empty instead of empty objects
* Use C++11 default keyword for trivial constructors and destructors
* Drop some useless casts
* Use emplace_back instead of push_back to improve performance of some vectors push
This commit is contained in:
Loïc Blot 2017-08-15 20:30:30 +02:00 committed by GitHub
parent 64c7a689ad
commit 9dd0f952e0
9 changed files with 104 additions and 113 deletions

View file

@ -419,8 +419,7 @@ std::vector<core::vector3d<u32>> RenderingEngine::getSupportedVideoModes()
for (s32 i = 0; i != num_modes; i++) {
core::dimension2d<u32> mode_res = modelist->getVideoModeResolution(i);
u32 mode_depth = (u32)modelist->getVideoModeDepth(i);
mlist.push_back(core::vector3d<u32>(
mode_res.Width, mode_res.Height, mode_depth));
mlist.emplace_back(mode_res.Width, mode_res.Height, mode_depth);
}
nulldevice->drop();