Catch exceptions by const-reference
Exceptions caught by value incur needless cost in C++, most of them can be caught by const-reference, especially as nearly none are actually used. This could allow compiler generate a slightly more efficient code.
This commit is contained in:
@@ -1032,7 +1032,7 @@ void Core_SeqBaseTest::run( int )
|
||||
cvClearMemStorage( storage );
|
||||
}
|
||||
}
|
||||
catch(int)
|
||||
catch(const int &)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1200,7 +1200,7 @@ void Core_SeqSortInvTest::run( int )
|
||||
storage.release();
|
||||
}
|
||||
}
|
||||
catch (int)
|
||||
catch (const int &)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1416,7 +1416,7 @@ void Core_SetTest::run( int )
|
||||
storage.release();
|
||||
}
|
||||
}
|
||||
catch(int)
|
||||
catch(const int &)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1859,7 +1859,7 @@ void Core_GraphTest::run( int )
|
||||
storage.release();
|
||||
}
|
||||
}
|
||||
catch(int)
|
||||
catch(const int &)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -2121,7 +2121,7 @@ void Core_GraphScanTest::run( int )
|
||||
storage.release();
|
||||
}
|
||||
}
|
||||
catch(int)
|
||||
catch(const int &)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user