Kaydet (Commit) c6a56e0b authored tarafından Caolán McNamara's avatar Caolán McNamara

catch by const ref

Change-Id: I20da7ac6dddcc1905b3419df37dd19f162cd8998
üst 2c8432dc
...@@ -137,7 +137,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( ...@@ -137,7 +137,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
{ {
pDIB = new BitmapBuffer; pDIB = new BitmapBuffer;
} }
catch( std::bad_alloc& ) catch (const std::bad_alloc&)
{ {
pDIB = NULL; pDIB = NULL;
} }
...@@ -187,7 +187,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( ...@@ -187,7 +187,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
{ {
pDIB->mpBits = new sal_uInt8[ pDIB->mnScanlineSize * pDIB->mnHeight ]; pDIB->mpBits = new sal_uInt8[ pDIB->mnScanlineSize * pDIB->mnHeight ];
} }
catch(std::bad_alloc&) catch (const std::bad_alloc&)
{ {
delete pDIB; delete pDIB;
pDIB = NULL; pDIB = NULL;
...@@ -705,7 +705,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) ...@@ -705,7 +705,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
{ {
mpDIB->mpBits = new sal_uInt8[ mpDIB->mnScanlineSize * mpDIB->mnHeight ]; mpDIB->mpBits = new sal_uInt8[ mpDIB->mnScanlineSize * mpDIB->mnHeight ];
} }
catch( std::bad_alloc& ) catch (const std::bad_alloc&)
{ {
delete mpDIB; delete mpDIB;
mpDIB = NULL; mpDIB = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment