Workaround various "returning reference to temporary" warnings.

This commit is contained in:
Gael Guennebaud
2014-12-05 12:49:30 +01:00
parent 6ccf97f3e6
commit 80ed5bd90c
5 changed files with 9 additions and 11 deletions

View File

@@ -143,7 +143,7 @@ class CompressedStorage
}
/** Like at(), but the search is performed in the range [start,end) */
inline const Scalar& atInRange(size_t start, size_t end, Index key, const Scalar& defaultValue = Scalar(0)) const
inline Scalar atInRange(size_t start, size_t end, Index key, const Scalar &defaultValue = Scalar(0)) const
{
if (start>=end)
return defaultValue;