]> git.lyx.org Git - features.git/commit
Do not return a reference to a temporary variable
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Mar 2017 16:35:05 +0000 (17:35 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Mar 2017 16:37:41 +0000 (17:37 +0100)
commit5453e00cfa1f4974301f42ad238884b9ec7e7564
tree823bc1c8f78076a5767cf42de2a8e7dbdd15ba05
parent1f10969bb5c5f36017bf5ba8671381b09945cf57
Do not return a reference to a temporary variable

Coverity correctly spotted that the existing code creates a temporary
map and returns a value from it. It is not possible to make the map
const& directly because operator[] may change the map.

Therefore, we use map::find instead.
src/BufferParams.cpp