Fix catching polymorphic type by value

Replace catching polymorphic type std::bad_alloc 'by value'
with 'by reference'.
Pointed by gcc8
This commit is contained in:
Murai Takashi
2018-05-16 13:49:46 +00:00
committed by Adrien Destugues
parent c7c3973e09
commit b08627f310
18 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -1423,7 +1423,7 @@ ActivityView::_DrawHistory(bool drawBackground)
prev.Set(x, y);
}
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
// Not enough memory to allocate the line array.
// TODO we could try to draw using the slower but less memory
// consuming solution using StrokeLine.