]> git.mxchange.org Git - simgear.git/commit
Performance optimization: empty() instead of size()>0
authorTom Paoletti <zommaso@gmail.com>
Fri, 22 Mar 2013 02:27:30 +0000 (19:27 -0700)
committerJames Turner <zakalawe@mac.com>
Fri, 16 Aug 2013 15:48:35 +0000 (16:48 +0100)
commit15e3e92ec20b1c90dee217fe5e4eba5cbd44011d
tree9fc22541fece1ecbf78542a11b343c8ec07e8dc4
parentee403fd83ac207e8bc0d2c64cfad1f338be1c35f
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.
12 files changed:
simgear/environment/metar.cxx
simgear/io/sg_binobj.cxx
simgear/misc/sg_path.cxx
simgear/props/tiedpropertylist.hxx
simgear/scene/material/EffectBuilder.hxx
simgear/scene/material/Technique.cxx
simgear/scene/material/mat.cxx
simgear/scene/model/SGText.cxx
simgear/scene/sky/CloudShaderGeometry.cxx
simgear/scene/sky/cloudfield.cxx
simgear/scene/tgdb/apt_signs.cxx
simgear/scene/tgdb/obj.cxx