Skip to content

Commit 541b411

Browse files
author
Mats Kindahl
committed
Merging with mysql-5.1-rep+2
2 parents 24823d3 + d107a4c commit 541b411

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

sql/field.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -999,18 +999,19 @@ test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend)
999999

10001000

10011001
/**
1002-
Template function to compare two objects.
1002+
Function to compare two unsigned integers for their relative order.
1003+
Used below. In an anonymous namespace to not clash with definitions
1004+
in other files.
10031005
*/
10041006
namespace {
1005-
template <class A_type, class B_type>
1006-
int compare(A_type a, B_type b)
1007+
int compare(unsigned int a, unsigned int b)
10071008
{
10081009
if (a < b)
10091010
return -1;
10101011
if (b < a)
10111012
return 1;
10121013
return 0;
1013-
}
1014+
}
10141015
}
10151016

10161017
/**

sql/rpl_utility.cc

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@
1919
#include "rpl_rli.h"
2020

2121
/**
22-
Template function to compare two objects.
22+
Function to compare two size_t integers for their relative
23+
order. Used below.
2324
*/
24-
namespace {
25-
template <class Type>
26-
int compare(Type a, Type b)
27-
{
28-
if (a < b)
29-
return -1;
30-
if (b < a)
31-
return 1;
32-
return 0;
33-
}
25+
int compare(size_t a, size_t b)
26+
{
27+
if (a < b)
28+
return -1;
29+
if (b < a)
30+
return 1;
31+
return 0;
3432
}
3533

3634

0 commit comments

Comments
 (0)