Move valptridx operator- into DEFINE_VALPTRIDX_SUBTYPE
This commit is contained in:
parent
b29f2ef7bd
commit
d667772b21
|
@ -135,6 +135,12 @@ protected:
|
||||||
return {A, o, i}; \
|
return {A, o, i}; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
static inline name operator-(P Pconst *o, decltype(A) &O) \
|
||||||
|
{ \
|
||||||
|
return N(o, o - (&*O.begin())); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
name operator-(name, decltype(A) &) = delete; \
|
||||||
|
|
||||||
#define DEFINE_VALPTRIDX_SUBTYPE(N,P,I,A) \
|
#define DEFINE_VALPTRIDX_SUBTYPE(N,P,I,A) \
|
||||||
_DEFINE_VALPTRIDX_SUBTYPE_USERTYPE(N,P,I,A,N##_t,); \
|
_DEFINE_VALPTRIDX_SUBTYPE_USERTYPE(N,P,I,A,N##_t,); \
|
||||||
|
|
|
@ -625,13 +625,6 @@ struct object_array_t : public array<object, MAX_OBJECTS>
|
||||||
extern object_array_t Objects;
|
extern object_array_t Objects;
|
||||||
|
|
||||||
DEFINE_VALPTRIDX_SUBTYPE(objptridx, object, int16_t, Objects);
|
DEFINE_VALPTRIDX_SUBTYPE(objptridx, object, int16_t, Objects);
|
||||||
|
|
||||||
static inline objptridx_t operator-(object *o, object_array_t &O)
|
|
||||||
{
|
|
||||||
return objptridx(o, o - (&*O.begin()));
|
|
||||||
}
|
|
||||||
|
|
||||||
objptridx_t operator-(objptridx_t, object_array_t &) DXX_CXX11_EXPLICIT_DELETE;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue