Commit 541b4115 authored by Mats Kindahl's avatar Mats Kindahl

Merging with mysql-5.1-rep+2

parents 24823d3a d107a4ce
......@@ -999,18 +999,19 @@ test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend)
/**
Template function to compare two objects.
Function to compare two unsigned integers for their relative order.
Used below. In an anonymous namespace to not clash with definitions
in other files.
*/
namespace {
template <class A_type, class B_type>
int compare(A_type a, B_type b)
int compare(unsigned int a, unsigned int b)
{
if (a < b)
return -1;
if (b < a)
return 1;
return 0;
}
}
}
/**
......
......@@ -19,18 +19,16 @@
#include "rpl_rli.h"
/**
Template function to compare two objects.
Function to compare two size_t integers for their relative
order. Used below.
*/
namespace {
template <class Type>
int compare(Type a, Type b)
{
if (a < b)
return -1;
if (b < a)
return 1;
return 0;
}
int compare(size_t a, size_t b)
{
if (a < b)
return -1;
if (b < a)
return 1;
return 0;
}
......
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