A few more minor fixes geared towards lgtm.com alerts (#6127)
* Remove unfilled formatting placeholders in KLT parser. * Fix presumably unintentionally missing reference on PlanatPtr and ChunkyPtr call operators. * Fix catching pointer and make use-after-free of workimg easier to spot. Make sure all of our thrown exceptions derive from std::exception and then catch by reference instead of by pointer. * Fix mismatch between array form new and non-array form delete. * Simplify memory management of embedded color profiles by unifying allocation to use operator new.
This commit is contained in:
@@ -220,7 +220,7 @@ public:
|
||||
#endif
|
||||
return ptrs[row][col];
|
||||
}
|
||||
const T operator() (size_t row, size_t col) const
|
||||
const T& operator() (size_t row, size_t col) const
|
||||
{
|
||||
#if CHECK_BOUNDS
|
||||
assert (row < height_ && col < width_);
|
||||
@@ -1274,7 +1274,7 @@ public:
|
||||
#endif
|
||||
return ptr[3 * (row * width + col)];
|
||||
}
|
||||
const T operator() (size_t row, size_t col) const
|
||||
const T& operator() (size_t row, size_t col) const
|
||||
{
|
||||
#if CHECK_BOUNDS
|
||||
assert (row < height_ && col < width_);
|
||||
|
Reference in New Issue
Block a user