]> git.mxchange.org Git - flightgear.git/commit
Performance optimization: empty() instead of size()>0
authorTom Paoletti <zommaso@gmail.com>
Fri, 22 Mar 2013 02:42:22 +0000 (19:42 -0700)
committerJames Turner <zakalawe@mac.com>
Mon, 19 Aug 2013 08:01:59 +0000 (09:01 +0100)
commit81cd33e2fa9b5930784d3aed920eea0e3038e7f7
tree521522ae18ac81c0013f0927a943cb1b798d8ea8
parent296555f26b776a5ee04c33387ac85c108b8ca09c
Performance optimization: empty() instead of size()>0

empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
22 files changed:
src/ATC/trafficcontrol.cxx
src/ATC/trafficcontrol.hxx
src/Aircraft/replay.cxx
src/Airports/apt_loader.cxx
src/Autopilot/analogcomponent.hxx
src/Input/FGKeyboardInput.cxx
src/Instrumentation/HUD/HUD.cxx
src/Instrumentation/HUD/HUD.hxx
src/Instrumentation/KLN89/kln89.cxx
src/Instrumentation/dclgps.hxx
src/Instrumentation/mk_viii.cxx
src/Instrumentation/newnavradio.cxx
src/Main/locale.cxx
src/Main/logger.cxx
src/Main/metar_main.cxx
src/Main/options.cxx
src/Main/positioninit.cxx
src/Main/subsystemFactory.cxx
src/Network/generic.cxx
src/Sound/sample_queue.cxx
src/Traffic/Schedule.cxx
src/Viewer/fg_os_osgviewer.cxx