]> git.lyx.org Git - features.git/commit
"Performance" fixes suggested by cppcheck
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 28 May 2012 20:41:32 +0000 (22:41 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 28 May 2012 20:42:44 +0000 (22:42 +0200)
commita756403301ff8fb78df4dc1e131e4cd50cd976e1
treeb829099c8b551d202d3facffd12e6c901cb44deb
parent56118ce4b16f28a6f36a37cec4f583cceb56408a
"Performance" fixes suggested by cppcheck

While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
25 files changed:
src/Author.cpp
src/Buffer.cpp
src/BufferParams.cpp
src/CutAndPaste.cpp
src/LayoutModuleList.cpp
src/LyX.cpp
src/Paragraph.cpp
src/Text.cpp
src/TextClass.cpp
src/TextMetrics.cpp
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiGraphics.cpp
src/frontends/qt4/LengthCombo.cpp
src/frontends/qt4/LengthCombo.h
src/frontends/qt4/Menus.cpp
src/frontends/qt4/Validator.cpp
src/frontends/qt4/Validator.h
src/graphics/GraphicsLoader.cpp
src/mathed/InsetMathArray.cpp
src/mathed/InsetMathNest.cpp
src/output_latex.cpp
src/output_xhtml.cpp
src/tex2lyx/Preamble.cpp
src/tex2lyx/tex2lyx.cpp
src/tex2lyx/text.cpp