mirror of
https://github.com/catchorg/Catch2.git
synced 2025-12-01 01:09:33 +01:00
LexSort function optimization
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct LexSort {
|
struct LexSort {
|
||||||
bool operator() (TestCase i,TestCase j) const { return (i<j);}
|
bool operator() (const TestCase& i, const TestCase& j) const { return (i<j);}
|
||||||
};
|
};
|
||||||
struct RandomNumberGenerator {
|
struct RandomNumberGenerator {
|
||||||
int operator()( int n ) const { return std::rand() % n; }
|
int operator()( int n ) const { return std::rand() % n; }
|
||||||
|
|||||||
@@ -5926,7 +5926,7 @@ namespace Catch {
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct LexSort {
|
struct LexSort {
|
||||||
bool operator() (TestCase i,TestCase j) const { return (i<j);}
|
bool operator() (const TestCase& i, const TestCase& j) const { return (i<j);}
|
||||||
};
|
};
|
||||||
struct RandomNumberGenerator {
|
struct RandomNumberGenerator {
|
||||||
int operator()( int n ) const { return std::rand() % n; }
|
int operator()( int n ) const { return std::rand() % n; }
|
||||||
|
|||||||
Reference in New Issue
Block a user