mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
WL#5151: Conversion between different types when replicating
Fixes to get it to compile on MacOSX.
This commit is contained in:
parent
f43ca0254e
commit
d107a4ce48
2 changed files with 14 additions and 15 deletions
|
@ -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 {
|
namespace {
|
||||||
template <class A_type, class B_type>
|
int compare(unsigned int a, unsigned int b)
|
||||||
int compare(A_type a, B_type b)
|
|
||||||
{
|
{
|
||||||
if (a < b)
|
if (a < b)
|
||||||
return -1;
|
return -1;
|
||||||
if (b < a)
|
if (b < a)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,18 +19,16 @@
|
||||||
#include "rpl_rli.h"
|
#include "rpl_rli.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Template function to compare two objects.
|
Function to compare two size_t integers for their relative
|
||||||
|
order. Used below.
|
||||||
*/
|
*/
|
||||||
namespace {
|
int compare(size_t a, size_t b)
|
||||||
template <class Type>
|
{
|
||||||
int compare(Type a, Type b)
|
if (a < b)
|
||||||
{
|
return -1;
|
||||||
if (a < b)
|
if (b < a)
|
||||||
return -1;
|
return 1;
|
||||||
if (b < a)
|
return 0;
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue